Selaa lähdekoodia

Add default text "From shortcut" if shortcut meal entry contains no custom notes

Daniel Snällfot 1 vuosi sitten
vanhempi
commit
931b9f6254
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      FreeAPS/Sources/Shortcuts/Carbs/CarbPresetIntentRequest.swift

+ 1 - 1
FreeAPS/Sources/Shortcuts/Carbs/CarbPresetIntentRequest.swift

@@ -23,7 +23,7 @@ import Foundation
                 carbs: carbs,
                 fat: Decimal(quantityFat),
                 protein: Decimal(quantityProtein),
-                note: note,
+                note: (note?.isEmpty ?? true) ? "From shortcut" : note!,
                 enteredBy: CarbsEntry.manual,
                 isFPU: false, fpuID: nil
             )],