mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Fix cancel actions.
This commit is contained in:
parent
04fb31666b
commit
2527cab73e
@ -43,7 +43,7 @@ class QrCodeLoginShowQrCodeFragment : VectorBaseFragment<FragmentQrCodeLoginShow
|
||||
|
||||
private fun initCancelButton() {
|
||||
views.qrCodeLoginShowQrCodeCancelButton.debouncedClicks {
|
||||
activity?.supportFragmentManager?.popBackStack()
|
||||
parentFragmentManager.popBackStack()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user