Skip to content

Commit e5801a4

Browse files
committed
Make verification dialog cancelable.
1 parent 1787031 commit e5801a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package im.vector.app.features.crypto.verification
1717

1818
import android.app.Activity
1919
import android.app.Dialog
20+
import android.content.DialogInterface
2021
import android.os.Bundle
2122
import android.os.Parcelable
2223
import android.view.KeyEvent
@@ -85,7 +86,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
8586
}
8687

8788
init {
88-
isCancelable = false
89+
isCancelable = true
8990
}
9091

9192
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -396,6 +397,11 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
396397

397398
const val WAITING_SELF_VERIF_TAG: String = "WAITING_SELF_VERIF_TAG"
398399
}
400+
401+
override fun onCancel(dialog: DialogInterface) {
402+
super.onCancel(dialog)
403+
viewModel.confirmCancel()
404+
}
399405
}
400406

401407
// fun View.getParentCoordinatorLayout(): CoordinatorLayout? {

0 commit comments

Comments
 (0)