Fix layout after try again button is clicked.

This commit is contained in:
Onuray Sahin 2022-10-18 15:45:39 +03:00
parent 67be8c3c40
commit 0c52a7ed04
2 changed files with 7 additions and 1 deletions

View file

@ -24,6 +24,7 @@ import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.SimpleFragmentActivity
import im.vector.app.features.home.HomeActivity
import im.vector.lib.core.utils.compat.getParcelableCompat
@ -66,7 +67,7 @@ class QrCodeLoginActivity : SimpleFragmentActivity() {
}
private fun showInstructionsFragment(qrCodeLoginArgs: QrCodeLoginArgs) {
addFragment(
replaceFragment(
views.container,
QrCodeLoginInstructionsFragment::class.java,
qrCodeLoginArgs,

View file

@ -59,6 +59,11 @@ class QrCodeLoginViewModel @AssistedInject constructor(
}
private fun handleTryAgain() {
setState {
copy(
connectionStatus = null
)
}
_viewEvents.post(QrCodeLoginViewEvents.NavigateToInitialScreen)
}