Couple fixes for beta.

This commit is contained in:
Burak Kaan Köse
2026-04-16 13:45:11 +02:00
parent 65f7e0236a
commit 784144cd13
12 changed files with 217 additions and 33 deletions
@@ -15,6 +15,8 @@ namespace Wino.Mail.ViewModels;
public partial class SpecialImapCredentialsPageViewModel : MailBaseViewModel
{
private readonly IAccountService _accountService;
private readonly IDialogServiceBase _dialogService;
private static readonly Dictionary<SpecialImapProvider, string> AppPasswordHelpLinks = new()
{
{ SpecialImapProvider.iCloud, "https://support.apple.com/en-us/102654" },
@@ -56,9 +58,13 @@ public partial class SpecialImapCredentialsPageViewModel : MailBaseViewModel
: Translator.ProviderSelection_CalendarMode_CalDavDescription_Yahoo;
public SpecialImapCredentialsPageViewModel(
IAccountService accountService,
IDialogServiceBase dialogService,
INativeAppService nativeAppService,
WelcomeWizardContext wizardContext)
{
_accountService = accountService;
_dialogService = dialogService;
_nativeAppService = nativeAppService;
WizardContext = wizardContext;
}
@@ -98,10 +104,19 @@ public partial class SpecialImapCredentialsPageViewModel : MailBaseViewModel
}
[RelayCommand]
private void Proceed()
private async Task ProceedAsync()
{
if (!CanProceed) return;
if (await _accountService.AccountAddressExistsAsync(EmailAddress).ConfigureAwait(false))
{
await _dialogService.ShowMessageAsync(
Translator.DialogMessage_AccountAddressExistsMessage,
Translator.DialogMessage_AccountExistsTitle,
WinoCustomMessageDialogIcon.Warning);
return;
}
WizardContext.DisplayName = DisplayName?.Trim();
WizardContext.EmailAddress = EmailAddress?.Trim();
WizardContext.AppSpecificPassword = AppSpecificPassword?.Trim();