switch to sqlite
This commit is contained in:
@ -56,14 +56,13 @@ namespace Billing.Views
|
||||
{
|
||||
CategoryName = category.Name;
|
||||
CategoryIcon = category.Icon;
|
||||
if (category.TintColor == Color.Transparent ||
|
||||
category.TintColor == default)
|
||||
if (category.TintColor.IsTransparent())
|
||||
{
|
||||
TintColor = BaseTheme.CurrentPrimaryColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
TintColor = category.TintColor;
|
||||
TintColor = category.TintColor.ToColor();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -103,6 +102,7 @@ namespace Billing.Views
|
||||
{
|
||||
var currentColor = BaseTheme.CurrentPrimaryColor;
|
||||
var tintColor = TintColor;
|
||||
var color = (tintColor == currentColor ? Color.Transparent : tintColor).ToLong();
|
||||
var category = App.Categories.FirstOrDefault(c => c.Id == categoryId);
|
||||
if (category == null)
|
||||
{
|
||||
@ -111,7 +111,7 @@ namespace Billing.Views
|
||||
Id = -1,
|
||||
Name = CategoryName,
|
||||
Icon = CategoryIcon,
|
||||
TintColor = tintColor == currentColor ? Color.Transparent : tintColor,
|
||||
TintColor = color,
|
||||
ParentId = parent?.Id,
|
||||
Type = parent?.Type ?? CategoryType.Spending
|
||||
});
|
||||
@ -120,7 +120,7 @@ namespace Billing.Views
|
||||
{
|
||||
category.Name = CategoryName;
|
||||
category.Icon = CategoryIcon;
|
||||
category.TintColor = tintColor == currentColor ? Color.Transparent : tintColor;
|
||||
category.TintColor = color;
|
||||
CategoryChecked?.Invoke(this, category);
|
||||
}
|
||||
await Navigation.PopAsync();
|
||||
|
Reference in New Issue
Block a user