Fix cancel actions.

This commit is contained in:
Onuray Sahin 2022-10-07 17:48:40 +03:00
parent 04fb31666b
commit 2527cab73e
2 changed files with 8 additions and 1 deletions

View file

@ -43,7 +43,7 @@ class QrCodeLoginShowQrCodeFragment : VectorBaseFragment<FragmentQrCodeLoginShow
private fun initCancelButton() {
views.qrCodeLoginShowQrCodeCancelButton.debouncedClicks {
activity?.supportFragmentManager?.popBackStack()
parentFragmentManager.popBackStack()
}
}

View file

@ -39,9 +39,16 @@ class QrCodeLoginStatusFragment : VectorBaseFragment<FragmentQrCodeLoginStatusBi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initCancelButton()
observeViewState()
}
private fun initCancelButton() {
views.qrCodeLoginStatusCancelButton.debouncedClicks {
parentFragmentManager.popBackStack()
}
}
private fun observeViewState() {
viewModel.onEach {
when (it.connectionStatus) {