Fixed an issue where merged accounts are counting as 1 account for premium limit.
This commit is contained in:
@@ -29,5 +29,10 @@ namespace Wino.Core.Domain.Interfaces
|
|||||||
/// Provider details of the account.
|
/// Provider details of the account.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IProviderDetail ProviderDetail { get; set; }
|
IProviderDetail ProviderDetail { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How many accounts this provider has.
|
||||||
|
/// </summary>
|
||||||
|
int HoldingAccountCount { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace Wino.Mail.ViewModels
|
|||||||
public bool IsPurchasePanelVisible => !HasUnlimitedAccountProduct;
|
public bool IsPurchasePanelVisible => !HasUnlimitedAccountProduct;
|
||||||
public bool IsAccountCreationAlmostOnLimit => Accounts != null && Accounts.Count == FREE_ACCOUNT_COUNT - 1;
|
public bool IsAccountCreationAlmostOnLimit => Accounts != null && Accounts.Count == FREE_ACCOUNT_COUNT - 1;
|
||||||
public bool HasAccountsDefined => Accounts != null && Accounts.Any();
|
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);
|
public string UsedAccountsString => string.Format(Translator.WinoUpgradeRemainingAccountsMessage, Accounts.Count, FREE_ACCOUNT_COUNT);
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace Wino.Mail.ViewModels.Data
|
|||||||
|
|
||||||
public string StartupEntityAddresses => Account.Address;
|
public string StartupEntityAddresses => Account.Address;
|
||||||
|
|
||||||
|
public int HoldingAccountCount => 1;
|
||||||
|
|
||||||
public AccountProviderDetailViewModel(IProviderDetail providerDetail, MailAccount account)
|
public AccountProviderDetailViewModel(IProviderDetail providerDetail, MailAccount account)
|
||||||
{
|
{
|
||||||
ProviderDetail = providerDetail;
|
ProviderDetail = providerDetail;
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ namespace Wino.Mail.ViewModels.Data
|
|||||||
|
|
||||||
public string StartupEntityAddresses => AccountAddresses;
|
public string StartupEntityAddresses => AccountAddresses;
|
||||||
|
|
||||||
|
public int HoldingAccountCount => HoldingAccounts.Count;
|
||||||
|
|
||||||
public MergedAccountProviderDetailViewModel(MergedInbox mergedInbox, List<AccountProviderDetailViewModel> holdingAccounts)
|
public MergedAccountProviderDetailViewModel(MergedInbox mergedInbox, List<AccountProviderDetailViewModel> holdingAccounts)
|
||||||
{
|
{
|
||||||
MergedInbox = mergedInbox;
|
MergedInbox = mergedInbox;
|
||||||
|
|||||||
Reference in New Issue
Block a user