Commit 59d7f80

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-02-03 18:08:49
remove redundant conditions
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 999117b
Changed files (1)
lib
components
lib/components/dialoges/add_measurement_dialoge.dart
@@ -233,11 +233,11 @@ class _AddEntryDialogeState extends State<AddEntryDialoge> {
         }
 
         MedicineIntake? intake;
-        if (_showMedicineDosisInput && (medicationFormKey.currentState?.validate() ?? false)) {
+        if (_showMedicineDosisInput
+            && (medicationFormKey.currentState?.validate() ?? false)) {
           medicationFormKey.currentState?.save();
-          if (_showMedicineDosisInput
-              && medicineDosis != null
-              && medicineId != null) { // TODO: check if this extra condition is needed
+          if (medicineDosis != null
+              && medicineId != null) {
             intake = MedicineIntake(
               timestamp: time,
               medicine: medications