Bugfix in Omnipod wizard
This commit is contained in:
parent
567c215388
commit
b3cc8e86bf
|
@ -23,7 +23,7 @@ abstract class PodActivationActionFragmentBase : ActionFragmentBase() {
|
|||
}
|
||||
|
||||
override fun onFailure() {
|
||||
(actionViewModel as? PodActivationActionViewModelBase)?.let { viewModel ->
|
||||
(viewModel as? PodActivationActionViewModelBase)?.let { viewModel ->
|
||||
if (viewModel.isPodDeactivatable() and (viewModel.isPodInAlarm() or viewModel.isPodActivationTimeExceeded())) {
|
||||
view?.let {
|
||||
it.findViewById<Button>(R.id.omnipod_wizard_button_retry)?.visibility = View.GONE
|
||||
|
|
|
@ -8,13 +8,13 @@ import android.widget.ProgressBar
|
|||
import android.widget.TextView
|
||||
import androidx.annotation.LayoutRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.PodActivationActionViewModelBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.utils.extensions.toVisibility
|
||||
|
||||
abstract class ActionFragmentBase : WizardFragmentBase() {
|
||||
|
||||
val actionViewModel: PodActivationActionViewModelBase
|
||||
get() = viewModel as PodActivationActionViewModelBase
|
||||
val actionViewModel: ActionViewModelBase
|
||||
get() = viewModel as ActionViewModelBase
|
||||
|
||||
@SuppressLint("CutPasteId")
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
|
|
|
@ -38,7 +38,7 @@ class DeactivatePodFragment : ActionFragmentBase() {
|
|||
.setTitle(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod))
|
||||
.setMessage(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod_confirmation))
|
||||
.setPositiveButton(getString(R.string.omnipod_common_yes)) { _, _ ->
|
||||
(actionViewModel as DeactivatePodViewModel).discardPod()
|
||||
(viewModel as DeactivatePodViewModel).discardPod()
|
||||
findNavController().navigate(R.id.action_deactivatePodFragment_to_podDiscardedFragment)
|
||||
}
|
||||
.setNegativeButton(getString(R.string.omnipod_common_no), null)
|
||||
|
|
Loading…
Reference in a new issue