diff --git a/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs b/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs index 8e53d827..6e5c137b 100644 --- a/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs +++ b/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs @@ -266,7 +266,7 @@ public async Task SaveRecordingTripAsync(string name = "") IsBusy = false; progress?.Dispose(); } - + Logger.Instance.Track("SaveRecording failed"); return false; } diff --git a/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsDetailViewModel.cs b/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsDetailViewModel.cs index 60a7b65b..68d20ab5 100644 --- a/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsDetailViewModel.cs +++ b/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsDetailViewModel.cs @@ -110,8 +110,6 @@ public async Task ExecuteLoadTripCommandAsync(string id) if (IsBusy) return false; - Logger.Instance.Track("LoadPastTrip"); - var progress = Acr.UserDialogs.UserDialogs.Instance.Loading("Loading trip details...", maskType: Acr.UserDialogs.MaskType.Clear); @@ -143,15 +141,18 @@ public async Task ExecuteLoadTripCommandAsync(string id) POIs.AddRange(await StoreManager.POIStore.GetItemsAsync(Trip.Id)); Title = Trip.Name; + Logger.Instance.Track("LoadPastTrip"); } else { + Logger.Instance.Track("LoadPastTrip: no trip points!"); error = true; } } catch (Exception ex) { + Logger.Instance.Track("Error loading past trip!"); Logger.Instance.Report(ex); error = true; } diff --git a/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsViewModel.cs b/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsViewModel.cs index a112eac2..68effd47 100644 --- a/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsViewModel.cs +++ b/src/MobileApps/MyDriving/MyDriving/ViewModel/PastTripsViewModel.cs @@ -70,9 +70,6 @@ public async Task ExecuteLoadPastTripsCommandAsync() if (IsBusy) return; - var track = Logger.Instance.TrackTime("LoadTrips"); - track?.Start(); - var progressDialog = UserDialogs.Instance.Loading("Loading trips...", maskType: MaskType.Clear); try @@ -84,14 +81,15 @@ public async Task ExecuteLoadPastTripsCommandAsync() Trips.ReplaceRange(items); CanLoadMore = Trips.Count == 25; + Logger.Instance.Track("LoadTrips"); } catch (Exception ex) { Logger.Instance.Report(ex); + Logger.Instance.Track("Loading trips failed"); } finally { - track?.Stop(); IsBusy = false; progressDialog?.Dispose();