issue fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Billing.Models;
|
||||
using Billing.Themes;
|
||||
using Billing.UI;
|
||||
using Billing.Views;
|
||||
using System;
|
||||
@@ -83,9 +84,13 @@ namespace Billing
|
||||
|
||||
public static UIBill WrapBill(Bill b)
|
||||
{
|
||||
var category = App.Categories.FirstOrDefault(c => c.Id == b.CategoryId);
|
||||
return new UIBill(b)
|
||||
{
|
||||
Icon = App.Categories.FirstOrDefault(c => c.Id == b.CategoryId)?.Icon ?? Definition.DefaultIcon,
|
||||
Icon = category?.Icon ?? Definition.DefaultIcon,
|
||||
TintColor = category?.TintColor.IsTransparent() == false ?
|
||||
category.TintColor.ToColor() :
|
||||
BaseTheme.CurrentPrimaryColor,
|
||||
Name = b.Name,
|
||||
DateCreation = b.CreateTime,
|
||||
Amount = b.Amount,
|
||||
|
||||
Reference in New Issue
Block a user