From 53dbeadabb190ac11f520534042b15e5cef009ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Thu, 22 Aug 2024 00:52:41 +0200 Subject: [PATCH] Prevent asking users for startup launch if they already did that. --- Wino.Mail.ViewModels/AppShellViewModel.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Wino.Mail.ViewModels/AppShellViewModel.cs b/Wino.Mail.ViewModels/AppShellViewModel.cs index 342786e1..46a39f8d 100644 --- a/Wino.Mail.ViewModels/AppShellViewModel.cs +++ b/Wino.Mail.ViewModels/AppShellViewModel.cs @@ -252,6 +252,15 @@ namespace Wino.Mail.ViewModels { if (!_configurationService.Get(IsActivateStartupLaunchAskedKey, false)) { + var currentBehavior = await _startupBehaviorService.GetCurrentStartupBehaviorAsync(); + + // User somehow already enabled Wino before the first launch. + if (currentBehavior == StartupBehaviorResult.Enabled) + { + _configurationService.Set(IsActivateStartupLaunchAskedKey, true); + return; + } + bool isAccepted = await DialogService.ShowWinoCustomMessageDialogAsync(Translator.DialogMessage_EnableStartupLaunchTitle, Translator.DialogMessage_EnableStartupLaunchMessage, Translator.Buttons_Yes,