diff --git a/src/MobileApps/MyDriving/MyDriving.UWP/Views/CurrentTripView.xaml.cs b/src/MobileApps/MyDriving/MyDriving.UWP/Views/CurrentTripView.xaml.cs index 3b673402..94d87a10 100644 --- a/src/MobileApps/MyDriving/MyDriving.UWP/Views/CurrentTripView.xaml.cs +++ b/src/MobileApps/MyDriving/MyDriving.UWP/Views/CurrentTripView.xaml.cs @@ -267,6 +267,11 @@ private async void StartRecordBtn_Click(object sender, RoutedEventArgs e) { // Need to update Map UI before we start saving. So that the entire trip is visible. UpdateMap_PositionChanged(basicGeoposition); + + // Changing the record button icon and andding end marker earlier to notify user about the stop process. + recordButtonImage = new BitmapImage(new Uri("ms-appx:///Assets/StartRecord.png", UriKind.Absolute)); + OnPropertyChanged(nameof(RecordButtonImage)); + AddEndMarker(basicGeoposition); if (!await ViewModel.StopRecordingTrip()) { @@ -274,15 +279,10 @@ private async void StartRecordBtn_Click(object sender, RoutedEventArgs e) return; } - // Need to add the end marker only when we are able to stop the trip. - AddEndMarker(basicGeoposition); + await ViewModel.SaveRecordingTripAsync(); - recordButtonImage = new BitmapImage(new Uri("ms-appx:///Assets/StartRecord.png", UriKind.Absolute)); - OnPropertyChanged(nameof(RecordButtonImage)); var recordedTripSummary = ViewModel.TripSummary; - await ViewModel.SaveRecordingTripAsync(); // Launch Trip Summary Page. - Frame.Navigate(typeof(TripSummaryView), recordedTripSummary); } else