Optimize preview start timing in LoadingViewModel
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 19 Jan 2021 11:10:43 +0000 (20:10 +0900)
committerPiotr Czaja <p.czaja@samsung.com>
Tue, 14 Sep 2021 11:01:34 +0000 (13:01 +0200)
Fitness/ViewModels/LoadingViewModel.cs

index 14c03004912429262523db245708a682b9cab176..a1b25639416e170e5da85c28bb34f73b84e02d14 100644 (file)
@@ -73,6 +73,15 @@ namespace Fitness.ViewModels
             {
                 Text = messages[count++];
 
+                // If next string to display is 'String.Empty'
+                if (count == messages.Length - 1)
+                {
+                    // Workaround.
+                    // After setting Text to 'GO!', we don't need to wait 1.5 sec before starting preview.
+                    // But if we move to ExersingView here, the string 'GO!' is not displayed.
+                    timer.Interval = 0;
+                }
+
                 if (count == messages.Length)
                 {
                     Services.NavigationService.Instance.NavigateToExercisingView();