mirror of
https://github.com/usatiuk/PomoTime.git
synced 2025-10-28 08:27:48 +01:00
v1.0.9.0
fix a possible issue with notifications not being delivered at correct time
This commit is contained in:
@@ -231,6 +231,21 @@ namespace PomoTime
|
||||
}
|
||||
}
|
||||
|
||||
private void RescheduleNotification()
|
||||
{
|
||||
ClearScheduledNotifications();
|
||||
|
||||
if(!MainViewRunningState.IsRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (MainViewRunningState.MinutesLeft != 0 || MainViewRunningState.SecondsLeft != 0)
|
||||
{
|
||||
SchedulePeriodOverNotification();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void PlayButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -275,18 +290,24 @@ namespace PomoTime
|
||||
{
|
||||
AppBarButton b = sender as AppBarButton;
|
||||
MainViewRunningState.MinutesLeft += 1;
|
||||
|
||||
RescheduleNotification();
|
||||
}
|
||||
|
||||
private void Plus5Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AppBarButton b = sender as AppBarButton;
|
||||
MainViewRunningState.MinutesLeft += 5;
|
||||
|
||||
RescheduleNotification();
|
||||
}
|
||||
|
||||
private void Plus10Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AppBarButton b = sender as AppBarButton;
|
||||
MainViewRunningState.MinutesLeft += 10;
|
||||
|
||||
RescheduleNotification();
|
||||
}
|
||||
private void OnSuspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e)
|
||||
{
|
||||
@@ -394,6 +415,8 @@ namespace PomoTime
|
||||
Reset();
|
||||
SaveLocalState();
|
||||
}
|
||||
|
||||
RescheduleNotification();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Identity
|
||||
Name="44844StepanUsatyuk.PomoTime"
|
||||
Publisher="CN=D7EE55C2-4D4B-40F8-8EE5-CC4CEBCE2133"
|
||||
Version="1.0.8.0" />
|
||||
Version="1.0.9.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="4d8bddac-8ab7-4c19-b3c7-7b5a27b87594" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user