switch to sqlite
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
using Billing.Languages;
|
||||
using Billing.Models;
|
||||
using Billing.Store;
|
||||
using Billing.Themes;
|
||||
using Billing.UI;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Billing.Views
|
||||
@ -68,9 +68,9 @@ namespace Billing.Views
|
||||
Icon = category.Icon,
|
||||
Name = category.Name,
|
||||
IsTopCategory = IsTopCategory,
|
||||
TintColor = category.TintColor == Color.Transparent || category.TintColor == default ?
|
||||
TintColor = category.TintColor.IsTransparent() ?
|
||||
BaseTheme.CurrentPrimaryColor :
|
||||
category.TintColor
|
||||
category.TintColor.ToColor()
|
||||
};
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ namespace Billing.Views
|
||||
Categories.Remove(c);
|
||||
groupLayout.Refresh(Categories);
|
||||
App.Categories.Remove(c.Category);
|
||||
_ = Task.Run(App.WriteCategories);
|
||||
await StoreHelper.DeleteCategoryItemAsync(c.Category);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -144,7 +144,7 @@ namespace Billing.Views
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCategoryChecked(object sender, Category category)
|
||||
private async void OnCategoryChecked(object sender, Category category)
|
||||
{
|
||||
if (category.Id < 0)
|
||||
{
|
||||
@ -183,16 +183,16 @@ namespace Billing.Views
|
||||
}
|
||||
groupLayout.Refresh(Categories);
|
||||
|
||||
Task.Run(App.WriteCategories);
|
||||
await StoreHelper.SaveCategoryItemAsync(category);
|
||||
}
|
||||
|
||||
private void UpdateCategory(UICategory c)
|
||||
{
|
||||
c.Name = c.Category.Name;
|
||||
c.Icon = c.Category.Icon;
|
||||
c.TintColor = c.Category.TintColor == Color.Transparent || c.Category.TintColor == default ?
|
||||
c.TintColor = c.Category.TintColor.IsTransparent() ?
|
||||
BaseTheme.CurrentPrimaryColor :
|
||||
c.Category.TintColor;
|
||||
c.Category.TintColor.ToColor();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user