From 88d57e217fffd159bb7899ba9a832b80afabf23e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 13:25:55 -0700 Subject: [PATCH] Fix the Monthly text for assets now that it has its proper type. --- lib/pages/tracked_item.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pages/tracked_item.dart b/lib/pages/tracked_item.dart index 8a6dc1e..3c76c32 100644 --- a/lib/pages/tracked_item.dart +++ b/lib/pages/tracked_item.dart @@ -103,12 +103,17 @@ class _TrackedItemPageState extends State { itemYearAmount = -1; estimateSymbolYearly = ""; } + + final String monthlyTitle = curr.type == ItemType.asset + ? "" + : " ${Frequency.monthly.title}"; + final String itemTopText = itemDayAmount < 0 ? "" : "$estimateSymbolDaily${itemDayAmount.toStringAsFixed(2)} ${Frequency.daily.title}"; final String itemMiddleText = itemMonthAmount < 0 ? "" - : "$estimateSymbolMonthly${itemMonthAmount.toStringAsFixed(2)} ${Frequency.monthly.title}"; + : "$estimateSymbolMonthly${itemMonthAmount.toStringAsFixed(2)}$monthlyTitle"; final String itemBottomText = itemYearAmount < 0 ? "" : "$estimateSymbolYearly${itemYearAmount.toStringAsFixed(2)} ${Frequency.yearly.title}";