Initial setup for account ordering.

This commit is contained in:
Burak Kaan Köse
2024-05-30 02:34:54 +02:00
parent 641bfd8c06
commit bf1de8e7a4
7 changed files with 104 additions and 5 deletions

View File

@@ -42,6 +42,7 @@ namespace Wino.Mail.ViewModels
public bool IsPurchasePanelVisible => !HasUnlimitedAccountProduct;
public bool IsAccountCreationAlmostOnLimit => Accounts != null && Accounts.Count == FREE_ACCOUNT_COUNT - 1;
public bool HasAccountsDefined => Accounts != null && Accounts.Any();
public bool CanReorderAccounts => Accounts?.Count > 1;
public string UsedAccountsString => string.Format(Translator.WinoUpgradeRemainingAccountsMessage, Accounts.Count, FREE_ACCOUNT_COUNT);
@@ -263,6 +264,12 @@ namespace Wino.Mail.ViewModels
mergedAccountProviderDetailViewModel));
}
[RelayCommand]
private async Task ReorderAccountsAsync()
{
}
public override void OnNavigatedFrom(NavigationMode mode, object parameters)
{
base.OnNavigatedFrom(mode, parameters);
@@ -276,6 +283,9 @@ namespace Wino.Mail.ViewModels
{
OnPropertyChanged(nameof(HasAccountsDefined));
OnPropertyChanged(nameof(UsedAccountsString));
OnPropertyChanged(nameof(IsAccountCreationAlmostOnLimit));
ReorderAccountsCommand.NotifyCanExecuteChanged();
}
private void PagePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)