Show toast when profile is not set

This commit is contained in:
jbr7rr 2023-07-21 08:54:30 +02:00
parent 1d58d85a71
commit 75f225fba2
2 changed files with 17 additions and 13 deletions

View file

@ -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<FragmentMedtrumOverviewBindi
)
}
EventType.PROFILE_NOT_SET -> ToastUtils.infoToast(requireContext(), R.string.no_profile_selected)
else -> Unit
}
}

View file

@ -95,6 +95,7 @@
<string name="step_deactivate_complete">Patch deactivated</string>
<string name="step_retry_activation">Activation in progress</string>
<string name="unexpected_state">Unexpected state: %1$s</string>
<string name="no_profile_selected">No profile selected. Please select a profile and try again.</string>
<string name="base_serial">Pump Base Serial: %1$X</string>
<string name="patch_begin_activation">No active patch. Press <b>Next</b> to begin the activation process.</string>