diff --git a/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs b/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs
index 2778acd2..d4a9b279 100644
--- a/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs
+++ b/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs
@@ -29,5 +29,10 @@ namespace Wino.Core.Domain.Interfaces
/// Provider details of the account.
///
IProviderDetail ProviderDetail { get; set; }
+
+ ///
+ /// How many accounts this provider has.
+ ///
+ int HoldingAccountCount { get; }
}
}
diff --git a/Wino.Mail.ViewModels/AccountManagementViewModel.cs b/Wino.Mail.ViewModels/AccountManagementViewModel.cs
index 712ac35a..dac24f3f 100644
--- a/Wino.Mail.ViewModels/AccountManagementViewModel.cs
+++ b/Wino.Mail.ViewModels/AccountManagementViewModel.cs
@@ -42,7 +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 bool CanReorderAccounts => Accounts?.Sum(a => a.HoldingAccountCount) > 1;
public string UsedAccountsString => string.Format(Translator.WinoUpgradeRemainingAccountsMessage, Accounts.Count, FREE_ACCOUNT_COUNT);
diff --git a/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs b/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs
index cd2d2a89..8cdacde7 100644
--- a/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs
+++ b/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs
@@ -21,6 +21,8 @@ namespace Wino.Mail.ViewModels.Data
public string StartupEntityAddresses => Account.Address;
+ public int HoldingAccountCount => 1;
+
public AccountProviderDetailViewModel(IProviderDetail providerDetail, MailAccount account)
{
ProviderDetail = providerDetail;
diff --git a/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs b/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs
index 1bd7de5b..07f3476b 100644
--- a/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs
+++ b/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs
@@ -24,6 +24,8 @@ namespace Wino.Mail.ViewModels.Data
public string StartupEntityAddresses => AccountAddresses;
+ public int HoldingAccountCount => HoldingAccounts.Count;
+
public MergedAccountProviderDetailViewModel(MergedInbox mergedInbox, List holdingAccounts)
{
MergedInbox = mergedInbox;