mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
Support for navigation to home screen
This commit is contained in:
parent
8dbb1b830e
commit
0111b932de
2 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
||||||
import im.vector.app.core.extensions.addFragment
|
import im.vector.app.core.extensions.addFragment
|
||||||
import im.vector.app.core.extensions.addFragmentToBackstack
|
import im.vector.app.core.extensions.addFragmentToBackstack
|
||||||
import im.vector.app.core.platform.SimpleFragmentActivity
|
import im.vector.app.core.platform.SimpleFragmentActivity
|
||||||
|
import im.vector.app.features.home.HomeActivity
|
||||||
import org.matrix.android.sdk.api.extensions.orFalse
|
import org.matrix.android.sdk.api.extensions.orFalse
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
|
@ -75,6 +76,7 @@ class QrCodeLoginActivity : SimpleFragmentActivity() {
|
||||||
when (it) {
|
when (it) {
|
||||||
QrCodeLoginViewEvents.NavigateToStatusScreen -> handleNavigateToStatusScreen()
|
QrCodeLoginViewEvents.NavigateToStatusScreen -> handleNavigateToStatusScreen()
|
||||||
QrCodeLoginViewEvents.NavigateToShowQrCodeScreen -> handleNavigateToShowQrCodeScreen()
|
QrCodeLoginViewEvents.NavigateToShowQrCodeScreen -> handleNavigateToShowQrCodeScreen()
|
||||||
|
QrCodeLoginViewEvents.NavigateToHomeScreen -> handleNavigateToHomeScreen()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +97,11 @@ class QrCodeLoginActivity : SimpleFragmentActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun handleNavigateToHomeScreen() {
|
||||||
|
val intent = HomeActivity.newIntent(this, firstStartMainActivity = false, existingSession = true)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val FRAGMENT_QR_CODE_INSTRUCTIONS_TAG = "FRAGMENT_QR_CODE_INSTRUCTIONS_TAG"
|
private const val FRAGMENT_QR_CODE_INSTRUCTIONS_TAG = "FRAGMENT_QR_CODE_INSTRUCTIONS_TAG"
|
||||||
|
|
|
@ -21,4 +21,5 @@ import im.vector.app.core.platform.VectorViewEvents
|
||||||
sealed class QrCodeLoginViewEvents : VectorViewEvents {
|
sealed class QrCodeLoginViewEvents : VectorViewEvents {
|
||||||
object NavigateToStatusScreen : QrCodeLoginViewEvents()
|
object NavigateToStatusScreen : QrCodeLoginViewEvents()
|
||||||
object NavigateToShowQrCodeScreen : QrCodeLoginViewEvents()
|
object NavigateToShowQrCodeScreen : QrCodeLoginViewEvents()
|
||||||
|
object NavigateToHomeScreen : QrCodeLoginViewEvents()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue