Explorar el Código

Fix Cancel temp entries

Ivan Valkou hace 4 años
padre
commit
12a2c1ca72
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

+ 5 - 1
FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

@@ -71,7 +71,11 @@ enum DataTable {
         }
         }
 
 
         var amountText: String {
         var amountText: String {
-            guard let amount = amount, amount > 0 else {
+            guard let amount = amount else {
+                return ""
+            }
+
+            if amount == 0, duration == 0 {
                 return "Cancel temp"
                 return "Cancel temp"
             }
             }