Change workout state to OnHold when workout time is up.
authorPiotr Czaja/Advanced Frameworks (PLT) /SRPOL/Engineer/Samsung Electronics <p.czaja@samsung.com>
Tue, 7 Sep 2021 11:14:14 +0000 (13:14 +0200)
committerPiotr Czaja <p.czaja@samsung.com>
Tue, 14 Sep 2021 11:01:36 +0000 (13:01 +0200)
Fitness/ViewModels/ExercisingViewModel.cs

index b787029f52fa7b76dbf4ff91baea83499dea3c31..a20f5877feb630e0bdb22522a549cb5b9f7eb3e9 100644 (file)
@@ -280,7 +280,7 @@ namespace Fitness.ViewModels
         }
 
         /// <summary>
-        /// Gets a value indicating whether the summary pop-up is visible.
+        /// Gets or sets a value indicating whether the summary pop-up is visible.
         /// </summary>
         public bool IsUserInterfaceVisible
         {
@@ -476,6 +476,11 @@ namespace Fitness.ViewModels
         private void ConfirmTimeIsUp()
         {
             UpdateStatistics();
+            if (State == WorkoutState.Playing)
+            {
+                State = WorkoutState.OnHold;
+            }
+
             SummaryOkCommand = new Command(Services.NavigationService.Instance.PopToRoot);
             SummaryType = SummaryType.TimeIsUp;
             IsSummaryVisible = true;