mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
copying all of the login fragments into the ftue auth domain
This commit is contained in:
parent
16ed3f799f
commit
2541c3f6a5
@ -63,11 +63,11 @@ abstract class AbstractFtueAuthFragment<VB : ViewBinding> : VectorBaseFragment<V
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
viewModel.observeViewEvents {
|
||||
handleLoginViewEvents(it)
|
||||
handleOnboardingViewEvents(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleLoginViewEvents(viewEvents: OnboardingViewEvents) {
|
||||
private fun handleOnboardingViewEvents(viewEvents: OnboardingViewEvents) {
|
||||
when (viewEvents) {
|
||||
is OnboardingViewEvents.Failure -> showFailure(viewEvents.throwable)
|
||||
else ->
|
||||
@ -178,6 +178,6 @@ abstract class AbstractFtueAuthFragment<VB : ViewBinding> : VectorBaseFragment<V
|
||||
// No op by default
|
||||
}
|
||||
|
||||
// Reset any modification on the loginViewModel by the current fragment
|
||||
// Reset any modification on the viewModel by the current fragment
|
||||
abstract fun resetViewModel()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
* Copyright 2019 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -30,16 +30,16 @@ import org.matrix.android.sdk.api.failure.is401
|
||||
import javax.inject.Inject
|
||||
|
||||
@Parcelize
|
||||
data class FtueAuthWaitForEmailFragmentArgument(
|
||||
data class LoginWaitForEmailFragmentArgument(
|
||||
val email: String
|
||||
) : Parcelable
|
||||
|
||||
/**
|
||||
* In this screen, the user is asked to check his emails
|
||||
*/
|
||||
class FtueAuthWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragment<FragmentLoginWaitForEmailBinding>() {
|
||||
class LoginWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragment<FragmentLoginWaitForEmailBinding>() {
|
||||
|
||||
private val params: FtueAuthWaitForEmailFragmentArgument by args()
|
||||
private val params: LoginWaitForEmailFragmentArgument by args()
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginWaitForEmailBinding {
|
||||
return FragmentLoginWaitForEmailBinding.inflate(inflater, container, false)
|
||||
|
Loading…
Reference in New Issue
Block a user