mirror of
https://github.com/usatiuk/PomoTime.git
synced 2025-10-29 00:47:48 +01:00
crash on first launch hotfix
This commit is contained in:
@@ -320,10 +320,12 @@ namespace PomoTime
|
||||
private void OnResuming(object sender, Object e)
|
||||
{
|
||||
ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
|
||||
if (localSettings.Values["SuspendTime"] != null)
|
||||
{
|
||||
SuspendTime = new DateTime((long)localSettings.Values["SuspendTime"]);
|
||||
|
||||
FastForwardTime(SuspendTime);
|
||||
}
|
||||
}
|
||||
|
||||
private void MainPageLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -344,10 +346,12 @@ namespace PomoTime
|
||||
MainViewRunningState = (RunningState)e.Parameter;
|
||||
|
||||
ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
|
||||
if (localSettings.Values["SuspendTime"] != null)
|
||||
{
|
||||
SuspendTime = new DateTime((long)localSettings.Values["SuspendTime"]);
|
||||
|
||||
FastForwardTime(SuspendTime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user