forked from dicko72/AAPS-EatingNow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ENTT_Notes.patch
52 lines (49 loc) · 2.57 KB
/
ENTT_Notes.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Index: app/src/main/java/info/nightscout/androidaps/dialogs/ENTempTargetDialog.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ENTempTargetDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ENTempTargetDialog.kt
--- a/app/src/main/java/info/nightscout/androidaps/dialogs/ENTempTargetDialog.kt (revision 2085d94769ffcc20f276ac99245d489abf323b6d)
+++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ENTempTargetDialog.kt (revision af526fe31aa68725ebdbe8a04235c405f47de9c5)
@@ -185,6 +185,11 @@
actions.add(rh.gs(R.string.stoptemptarget))
reason = rh.gs(R.string.stoptemptarget)
}
+
+ val notes = binding.notesLayout.notes.text.toString()
+ if (notes.isNotEmpty())
+ actions.add(rh.gs(R.string.notes_label) + ": " + notes)
+
if (eventTimeChanged)
actions.add(rh.gs(R.string.time) + ": " + dateUtil.dateAndTimeString(eventTime))
@@ -227,6 +232,10 @@
})
}
+ // attempt to log a notes entry also
+ //uel.log(Action.CAREPORTAL, CareDialog.EventType.NOTE, notes, ValueWithUnit.Timestamp(eventTime).takeIf { eventTimeChanged })
+ uel.log(Action.CAREPORTAL, Sources.Note, notes, ValueWithUnit.Timestamp(eventTime).takeIf { eventTimeChanged }, ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.EATING_NOW), ValueWithUnit.fromGlucoseUnit(target, units.asText), ValueWithUnit.Minute(duration))
+
if (duration == 10) sp.putBoolean(R.string.key_objectiveusetemptarget, true)
})
}
Index: app/src/main/res/layout/dialog_en_temptarget.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/res/layout/dialog_en_temptarget.xml b/app/src/main/res/layout/dialog_en_temptarget.xml
--- a/app/src/main/res/layout/dialog_en_temptarget.xml (revision 2085d94769ffcc20f276ac99245d489abf323b6d)
+++ b/app/src/main/res/layout/dialog_en_temptarget.xml (revision af526fe31aa68725ebdbe8a04235c405f47de9c5)
@@ -196,7 +196,11 @@
android:visibility="gone" />
</LinearLayout>
-
+
+ <include
+ android:id="@+id/notes_layout"
+ layout="@layout/notes" />
+
<include
android:id="@+id/datetime"
layout="@layout/datetime" />