fix issue
This commit is contained in:
@ -58,7 +58,7 @@ namespace Billing.Views
|
||||
if (category.TintColor == Color.Transparent ||
|
||||
category.TintColor == default)
|
||||
{
|
||||
TintColor = (Color)Application.Current.Resources[BaseTheme.PrimaryColor];
|
||||
TintColor = BaseTheme.CurrentPrimaryColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -67,7 +67,7 @@ namespace Billing.Views
|
||||
}
|
||||
else
|
||||
{
|
||||
TintColor = (Color)Application.Current.Resources[BaseTheme.PrimaryColor];
|
||||
TintColor = BaseTheme.CurrentPrimaryColor;
|
||||
}
|
||||
TintColorString = Helper.WrapColorString(TintColor.ToHex());
|
||||
|
||||
@ -77,6 +77,17 @@ namespace Billing.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private bool focused;
|
||||
|
||||
public override void OnLoaded()
|
||||
{
|
||||
if (!focused)
|
||||
{
|
||||
focused = true;
|
||||
editorName.SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
private void ColorPicker_ColorChanged(object sender, Color e)
|
||||
{
|
||||
TintColor = e;
|
||||
@ -91,6 +102,8 @@ namespace Billing.Views
|
||||
}
|
||||
using (Tap.Start())
|
||||
{
|
||||
var currentColor = BaseTheme.CurrentPrimaryColor;
|
||||
var tintColor = TintColor;
|
||||
var category = App.Categories.FirstOrDefault(c => c.Id == categoryId);
|
||||
if (category == null)
|
||||
{
|
||||
@ -99,8 +112,8 @@ namespace Billing.Views
|
||||
Id = -1,
|
||||
Name = CategoryName,
|
||||
Icon = CategoryIcon,
|
||||
TintColor = TintColor,
|
||||
ParentId = parent?.Id ?? -1,
|
||||
TintColor = tintColor == currentColor ? Color.Transparent : tintColor,
|
||||
ParentId = parent?.Id,
|
||||
Type = parent?.Type ?? CategoryType.Spending
|
||||
});
|
||||
}
|
||||
@ -108,7 +121,7 @@ namespace Billing.Views
|
||||
{
|
||||
category.Name = CategoryName;
|
||||
category.Icon = CategoryIcon;
|
||||
category.TintColor = TintColor;
|
||||
category.TintColor = tintColor == currentColor ? Color.Transparent : tintColor;
|
||||
CategoryChecked?.Invoke(this, category);
|
||||
}
|
||||
await Navigation.PopAsync();
|
||||
|
Reference in New Issue
Block a user