do not show 00:00 when a notification is opened

This commit is contained in:
2020-09-05 21:18:43 +03:00
parent 3f075ed69e
commit 80dc02d88e
3 changed files with 16 additions and 7 deletions

View File

@@ -109,12 +109,8 @@ namespace PomoTime
} }
} }
void TimerTick() void PlusSecond()
{ {
if (!MainViewRunningState.IsRunning)
{
return;
}
if (MainViewRunningState.SecondsLeft == 0) if (MainViewRunningState.SecondsLeft == 0)
{ {
MainViewRunningState.SecondsLeft = 59; MainViewRunningState.SecondsLeft = 59;
@@ -169,6 +165,14 @@ namespace PomoTime
} }
SaveLocalState(); SaveLocalState();
} }
void TimerTick()
{
if (!MainViewRunningState.IsRunning)
{
return;
}
PlusSecond();
}
void SchedulePeriodOverNotification() void SchedulePeriodOverNotification()
{ {
@@ -353,6 +357,8 @@ namespace PomoTime
MainViewRunningState.IsRunning = false; MainViewRunningState.IsRunning = false;
MainViewRunningState.MinutesLeft = 0; MainViewRunningState.MinutesLeft = 0;
MainViewRunningState.SecondsLeft = 0; MainViewRunningState.SecondsLeft = 0;
// Continue onto the next period
PlusSecond();
return; return;
} }

View File

@@ -11,7 +11,7 @@
Publisher="CN=D7EE55C2-4D4B-40F8-8EE5-CC4CEBCE2133" Publisher="CN=D7EE55C2-4D4B-40F8-8EE5-CC4CEBCE2133"
Version="1.0.11.0" /> Version="1.0.11.0" />
<mp:PhoneIdentity PhoneProductId="4d8bddac-8ab7-4c19-b3c7-7b5a27b87594" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> <mp:PhoneIdentity PhoneProductId="5cd2f65c-5a82-4864-85b9-f4560076f8c8" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties> <Properties>
<DisplayName>PomoTime</DisplayName> <DisplayName>PomoTime</DisplayName>

View File

@@ -18,7 +18,7 @@
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview> <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled> <AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>5805544F843D1A5B2C86CA0F6C5FB14BC9E5DA32</PackageCertificateThumbprint> <PackageCertificateThumbprint>1C5388D3142860F83259175BA4936CF2756B9AFC</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile> <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm> <AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision> <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
@@ -26,6 +26,8 @@
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms> <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks> <HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<AppxBundle>Always</AppxBundle> <AppxBundle>Always</AppxBundle>
<PackageCertificateKeyFile>
</PackageCertificateKeyFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -198,6 +200,7 @@
<Content Include="Assets\Square44x44Logo.scale-200.png" /> <Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" /> <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" /> <Content Include="Assets\Wide310x150Logo.scale-200.png" />
<None Include="PomoTime_TemporaryKey.pfx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ApplicationDefinition Include="App.xaml"> <ApplicationDefinition Include="App.xaml">