Check if bottom sheet is cancellable.

This commit is contained in:
Onuray Sahin 2023-01-13 18:15:52 +03:00
parent a12460b09c
commit 4a49f2ff9b

View file

@ -85,10 +85,6 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
return BottomSheetVerificationBinding.inflate(inflater, container, false)
}
init {
isCancelable = true
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
@ -211,6 +207,8 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
return@withState
}
isCancelable = state.isVerificationRequired.not()
// Did the request result in a SAS transaction?
if (state.sasTransactionState != null) {
when (state.sasTransactionState) {