Преглед изворни кода

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

Daniel Snällfot пре 1 година
родитељ
комит
931b9f6254
1 измењених фајлова са 1 додато и 1 уклоњено
  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
             )],