fix save imap settings and progress ring. (#704)
Added notification that settings saved.
This commit is contained in:
@@ -98,19 +98,13 @@ public partial class EditAccountDetailsPageViewModel : MailBaseViewModel
|
||||
Messenger.Send(new BackBreadcrumNavigationRequested());
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private Task SaveWithoutGoBackAsync()
|
||||
{
|
||||
return UpdateAccountAsync();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task ValidateImapSettingsAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
await _imapTestService.TestImapConnectionAsync(ServerInformation, true);
|
||||
_mailDialogService.InfoBarMessage(Translator.IMAPSetupDialog_ValidationSuccess_Title, Translator.IMAPSetupDialog_ValidationSuccess_Message, Core.Domain.Enums.InfoBarMessageType.Success); ;
|
||||
_mailDialogService.InfoBarMessage(Translator.IMAPSetupDialog_ValidationSuccess_Title, Translator.IMAPSetupDialog_ValidationSuccess_Message, Core.Domain.Enums.InfoBarMessageType.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -118,12 +112,9 @@ public partial class EditAccountDetailsPageViewModel : MailBaseViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private Task UpdateAccountAsync()
|
||||
[RelayCommand]
|
||||
private async Task UpdateCustomServerInformationAsync()
|
||||
{
|
||||
Account.Name = AccountName;
|
||||
Account.SenderName = SenderName;
|
||||
Account.AccountColorHex = SelectedColor == null ? string.Empty : SelectedColor.Hex;
|
||||
|
||||
if (ServerInformation != null)
|
||||
{
|
||||
ServerInformation.IncomingAuthenticationMethod = AvailableAuthenticationMethods[SelectedIncomingServerAuthenticationMethodIndex].ImapAuthenticationMethod;
|
||||
@@ -135,6 +126,17 @@ public partial class EditAccountDetailsPageViewModel : MailBaseViewModel
|
||||
Account.ServerInformation = ServerInformation;
|
||||
}
|
||||
|
||||
await _accountService.UpdateAccountCustomServerInformationAsync(Account.ServerInformation);
|
||||
|
||||
_mailDialogService.InfoBarMessage(Translator.IMAPSetupDialog_SaveImapSuccess_Title, Translator.IMAPSetupDialog_SaveImapSuccess_Message, Core.Domain.Enums.InfoBarMessageType.Success);
|
||||
}
|
||||
|
||||
private Task UpdateAccountAsync()
|
||||
{
|
||||
Account.Name = AccountName;
|
||||
Account.SenderName = SenderName;
|
||||
Account.AccountColorHex = SelectedColor == null ? string.Empty : SelectedColor.Hex;
|
||||
|
||||
return _accountService.UpdateAccountAsync(Account);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user