浏览代码

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
             )],