This commit is contained in:
Tsanie 2022-03-03 15:22:19 +08:00
parent 25191127f3
commit 030993b40e
2 changed files with 6 additions and 1 deletions

View File

@ -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();

View File

@ -21,7 +21,7 @@
</ContentPage.Resources>
<Shell.TitleView>
<Grid ColumnSpacing="16" ColumnDefinitions="20,*,20">
<Grid ColumnSpacing="16" ColumnDefinitions="20, *">
<ui:TintImage Source="calendar.png" WidthRequest="20" HeightRequest="20" VerticalOptions="Center"/>
<ui:LongPressButton Grid.Column="1" Text="{Binding SelectedDate, Converter={StaticResource titleDateConverter}}"
TextColor="{DynamicResource PrimaryColor}"