switch to sqlite
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Billing.Languages;
|
||||
using Billing.Models;
|
||||
using Billing.Store;
|
||||
using Billing.UI;
|
||||
using Xamarin.Forms;
|
||||
|
||||
@ -120,25 +120,27 @@ namespace Billing.Views
|
||||
if (group == null)
|
||||
{
|
||||
Helper.Error("account.delete", "unexpected deleting account, cannot find the current category");
|
||||
return;
|
||||
}
|
||||
group.Remove(account);
|
||||
if (group.Count == 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
accounts.Remove(group);
|
||||
group.Remove(account);
|
||||
if (group.Count == 0)
|
||||
{
|
||||
accounts.Remove(group);
|
||||
}
|
||||
}
|
||||
RefreshBalance();
|
||||
groupLayout.Refresh(accounts);
|
||||
|
||||
RankPage.Instance?.SetNeedRefresh();
|
||||
|
||||
_ = Task.Run(App.WriteAccounts);
|
||||
await StoreHelper.DeleteAccountItemAsync(account);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AccountChecked(object sender, AccountEventArgs e)
|
||||
private async void AccountChecked(object sender, AccountEventArgs e)
|
||||
{
|
||||
var add = e.Account.Id < 0;
|
||||
if (add)
|
||||
@ -151,7 +153,7 @@ namespace Billing.Views
|
||||
|
||||
RankPage.Instance?.SetNeedRefresh();
|
||||
|
||||
Task.Run(App.WriteAccounts);
|
||||
await StoreHelper.SaveAccountItemAsync(e.Account);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user