fix crash on pod deactivation

This commit is contained in:
Andrei Vereha 2021-04-21 21:02:35 +02:00
parent 1e4cda01a3
commit 3ef983b732

View file

@ -31,7 +31,8 @@ class DeactivatePodFragment : ActionFragmentBase() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
view.findViewById<Button>(R.id.omnipod_wizard_button_discard_pod)?.setOnClickListener { buttonDiscardPod = view.findViewById(R.id.omnipod_wizard_button_discard_pod)
buttonDiscardPod.setOnClickListener {
context?.let { context?.let {
AlertDialog.Builder(it) AlertDialog.Builder(it)
.setIcon(android.R.drawable.ic_dialog_alert) .setIcon(android.R.drawable.ic_dialog_alert)