From 030993b40e8ed69ab3337114d86f21d1e56b01df Mon Sep 17 00:00:00 2001 From: Tsanie Date: Thu, 3 Mar 2022 15:22:19 +0800 Subject: [PATCH] tiny fix --- Billing.Shared/Views/AccountPage.xaml.cs | 5 +++++ Billing.Shared/Views/BillPage.xaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 @@ - +