From 80dc02d88eec2a9d13d2bed07552030800c597c6 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sat, 5 Sep 2020 21:18:43 +0300 Subject: [PATCH] do not show 00:00 when a notification is opened --- PomoTime/MainPage.xaml.cs | 16 +++++++++++----- PomoTime/Package.appxmanifest | 2 +- PomoTime/PomoTime.csproj | 5 ++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/PomoTime/MainPage.xaml.cs b/PomoTime/MainPage.xaml.cs index 557eca8..aa3d331 100644 --- a/PomoTime/MainPage.xaml.cs +++ b/PomoTime/MainPage.xaml.cs @@ -109,12 +109,8 @@ namespace PomoTime } } - void TimerTick() + void PlusSecond() { - if (!MainViewRunningState.IsRunning) - { - return; - } if (MainViewRunningState.SecondsLeft == 0) { MainViewRunningState.SecondsLeft = 59; @@ -169,6 +165,14 @@ namespace PomoTime } SaveLocalState(); } + void TimerTick() + { + if (!MainViewRunningState.IsRunning) + { + return; + } + PlusSecond(); + } void SchedulePeriodOverNotification() { @@ -353,6 +357,8 @@ namespace PomoTime MainViewRunningState.IsRunning = false; MainViewRunningState.MinutesLeft = 0; MainViewRunningState.SecondsLeft = 0; + // Continue onto the next period + PlusSecond(); return; } diff --git a/PomoTime/Package.appxmanifest b/PomoTime/Package.appxmanifest index 1f2b920..ee53d21 100644 --- a/PomoTime/Package.appxmanifest +++ b/PomoTime/Package.appxmanifest @@ -11,7 +11,7 @@ Publisher="CN=D7EE55C2-4D4B-40F8-8EE5-CC4CEBCE2133" Version="1.0.11.0" /> - + PomoTime diff --git a/PomoTime/PomoTime.csproj b/PomoTime/PomoTime.csproj index 17034b6..c295fb2 100644 --- a/PomoTime/PomoTime.csproj +++ b/PomoTime/PomoTime.csproj @@ -18,7 +18,7 @@ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} true True - 5805544F843D1A5B2C86CA0F6C5FB14BC9E5DA32 + 1C5388D3142860F83259175BA4936CF2756B9AFC False SHA256 True @@ -26,6 +26,8 @@ x86|x64|arm 0 Always + + true @@ -198,6 +200,7 @@ +