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