From 75f225fba28b409fb9c1d365b725ed8b5ad362c0 Mon Sep 17 00:00:00 2001 From: jbr7rr <> Date: Fri, 21 Jul 2023 08:54:30 +0200 Subject: [PATCH] Show toast when profile is not set --- .../medtrum/ui/MedtrumOverviewFragment.kt | 3 +++ pump/medtrum/src/main/res/values/strings.xml | 27 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt index 90cc9e9018..8836089a41 100644 --- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt +++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt @@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui import android.os.Bundle import android.view.View import androidx.lifecycle.ViewModelProvider +import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.interfaces.protection.ProtectionCheck import info.nightscout.pump.medtrum.MedtrumPump import info.nightscout.pump.medtrum.databinding.FragmentMedtrumOverviewBinding @@ -63,6 +64,8 @@ class MedtrumOverviewFragment : MedtrumBaseFragment ToastUtils.infoToast(requireContext(), R.string.no_profile_selected) + else -> Unit } } diff --git a/pump/medtrum/src/main/res/values/strings.xml b/pump/medtrum/src/main/res/values/strings.xml index c1ecf604ed..575782c9eb 100644 --- a/pump/medtrum/src/main/res/values/strings.xml +++ b/pump/medtrum/src/main/res/values/strings.xml @@ -82,19 +82,20 @@ Next Discard - Activate Patch - Connect and Fill - Prime - Priming - Priming Complete - Attach Patch - Activating... - Activation Complete - Deactivate Patch - Deactivating... - Patch deactivated - Activation in progress - Unexpected state: %1$s + Activate Patch + Connect and Fill + Prime + Priming + Priming Complete + Attach Patch + Activating... + Activation Complete + Deactivate Patch + Deactivating... + Patch deactivated + Activation in progress + Unexpected state: %1$s + No profile selected. Please select a profile and try again. Pump Base Serial: %1$X No active patch. Press Next to begin the activation process.