diff --git a/src/LudusaviPlaynite.cs b/src/LudusaviPlaynite.cs index 26eb814..edb63b1 100644 --- a/src/LudusaviPlaynite.cs +++ b/src/LudusaviPlaynite.cs @@ -318,26 +318,29 @@ public override void OnApplicationStarted(OnApplicationStartedEventArgs args) SavePluginSettings(settings); } - RefreshLudusaviVersion(); - RefreshLudusaviBackups(); - - if (appVersion.version < RECOMMENDED_APP_VERSION && new Version(settings.SuggestedUpgradeTo) < RECOMMENDED_APP_VERSION) + Task.Run(() => { - NotifyInfo( - translator.UpgradePrompt(RECOMMENDED_APP_VERSION.ToString()), - () => - { - try + RefreshLudusaviVersion(); + RefreshLudusaviBackups(); + + if (appVersion.version < RECOMMENDED_APP_VERSION && new Version(settings.SuggestedUpgradeTo) < RECOMMENDED_APP_VERSION) + { + NotifyInfo( + translator.UpgradePrompt(RECOMMENDED_APP_VERSION.ToString()), + () => { - RunCommand("cmd.exe", "/c \"start https://github.com/mtkennerly/ludusavi/releases\""); + try + { + RunCommand("cmd.exe", "/c \"start https://github.com/mtkennerly/ludusavi/releases\""); + } + catch + { } } - catch - { } - } - ); - settings.SuggestedUpgradeTo = RECOMMENDED_APP_VERSION.ToString(); - SavePluginSettings(settings); - } + ); + settings.SuggestedUpgradeTo = RECOMMENDED_APP_VERSION.ToString(); + SavePluginSettings(settings); + } + }); } public override void OnGameStarting(OnGameStartingEventArgs args)