diff --git a/Billing.Shared/Views/AccountPage.xaml.cs b/Billing.Shared/Views/AccountPage.xaml.cs index bd0782d..20054a9 100644 --- a/Billing.Shared/Views/AccountPage.xaml.cs +++ b/Billing.Shared/Views/AccountPage.xaml.cs @@ -116,6 +116,7 @@ namespace Billing.Views var result = await this.ShowConfirm(Resource.ConfirmDeleteAccount); if (result) { + App.Accounts.Remove(account); var group = accounts.FirstOrDefault(a => a.Key == account.Category); if (group == null) { @@ -123,6 +124,10 @@ namespace Billing.Views return; } group.Remove(account); + if (group.Count == 0) + { + accounts.Remove(group); + } groupLayout.Refresh(accounts); RefreshBalance(); diff --git a/Billing.Shared/Views/BillPage.xaml b/Billing.Shared/Views/BillPage.xaml index 687a5ce..ce6232f 100644 --- a/Billing.Shared/Views/BillPage.xaml +++ b/Billing.Shared/Views/BillPage.xaml @@ -21,7 +21,7 @@ - +