Skip to content

Commit eb714f6

Browse files
committed
Update AppLifecycleHelper.cs
1 parent 53e596b commit eb714f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Files.App/Helpers/Application/AppLifecycleHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static AppLifecycleHelper()
6161
{
6262
IsAppUpdated = version.ToString() != AppVersion.ToString();
6363
}
64-
TotalLaunchCount = launchCount is long l ? l + 1 : 1;
64+
65+
TotalLaunchCount = long.TryParse(launchCount?.ToString(), out var v) ? v + 1 : 1;
6566
infoKey.SetValue("LastLaunchVersion", AppVersion.ToString());
6667
infoKey.SetValue("TotalLaunchCount", TotalLaunchCount);
6768
}

0 commit comments

Comments
 (0)