Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
[XAML] Fixed DateTime storage in local settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ltomuta committed Jul 17, 2014
1 parent 57ff261 commit eae8af0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions RateMyApp/Helpers/FeedbackHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ private void LoadState()
{
LaunchCount = StorageHelper.GetSetting<int>(LaunchCountKey);
IsReviewed = StorageHelper.GetSetting<bool>(ReviewedKey);
#if SILVERLIGHT
LastLaunchDate = StorageHelper.GetSetting<DateTime>(LastLaunchDateKey);
#else
LastLaunchDate = DateTime.FromBinary(StorageHelper.GetSetting<long>(LastLaunchDateKey));
#endif

if (!reviewed)
{
Expand Down Expand Up @@ -231,8 +235,7 @@ private void StoreState()
#if SILVERLIGHT
StorageHelper.StoreSetting(LastLaunchDateKey, lastLaunchDate, true);
#else
#warning Solution needed here
//StorageHelper.StoreSetting(LastLaunchDateKey, lastLaunchDate, true);
StorageHelper.StoreSetting(LastLaunchDateKey, lastLaunchDate.ToBinary(), true);
#endif
}
catch (Exception ex)
Expand Down

0 comments on commit eae8af0

Please sign in to comment.