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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user