From c68344a3219809f7f8df9e6efbee261f24b2fe55 Mon Sep 17 00:00:00 2001
From: MarcusStorvangJonassen
 <95277125+MarcusStorvangJonassen@users.noreply.github.com>
Date: Sat, 5 Apr 2025 10:46:12 +0200
Subject: [PATCH] Fixed so Stepcounter is not going up and down when switching
 pages

---
 BeSafePlus/Views/ActivityHistoryPage.xaml.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/BeSafePlus/Views/ActivityHistoryPage.xaml.cs b/BeSafePlus/Views/ActivityHistoryPage.xaml.cs
index a6be905..4582489 100644
--- a/BeSafePlus/Views/ActivityHistoryPage.xaml.cs
+++ b/BeSafePlus/Views/ActivityHistoryPage.xaml.cs
@@ -50,7 +50,10 @@ namespace BeSafePlus
 
             await Task.WhenAll(loadStepGoalTask, loadWeeklyStepsTask, loadMonthlyStepsTask, getStepCountTask);
 
-            _viewModel.AccumulatedSteps = await getStepCountTask;
+            if (_viewModel.AccumulatedSteps == 0)
+            {
+                _viewModel.AccumulatedSteps = await getStepCountTask;
+            }
 
             LoadChart();
 
-- 
GitLab