mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 20:09:27 +03:00
using correct views instances - fixes missing loading
This commit is contained in:
parent
d5373545f0
commit
768419b11a
2 changed files with 8 additions and 6 deletions
|
@ -34,7 +34,7 @@ import javax.inject.Inject
|
|||
class OnboardingActivity : VectorBaseActivity<ActivityLoginBinding>(), ToolbarConfigurable, UnlockedActivity {
|
||||
|
||||
private val onboardingVariant by lifecycleAwareLazy {
|
||||
onboardingVariantFactory.create(this, onboardingViewModel = lazyViewModel(), loginViewModel2 = lazyViewModel())
|
||||
onboardingVariantFactory.create(this, views = views, onboardingViewModel = lazyViewModel(), loginViewModel2 = lazyViewModel())
|
||||
}
|
||||
|
||||
@Inject lateinit var onboardingVariantFactory: OnboardingVariantFactory
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.app.features.onboarding
|
||||
|
||||
import im.vector.app.databinding.ActivityLoginBinding
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.login2.LoginViewModel2
|
||||
import im.vector.app.features.onboarding.ftueauth.FtueAuthVariant
|
||||
|
@ -26,18 +27,19 @@ class OnboardingVariantFactory @Inject constructor(
|
|||
) {
|
||||
|
||||
fun create(activity: OnboardingActivity,
|
||||
views: ActivityLoginBinding,
|
||||
onboardingViewModel: Lazy<OnboardingViewModel>,
|
||||
loginViewModel2: Lazy<LoginViewModel2>
|
||||
) = when (vectorFeatures.onboardingVariant()) {
|
||||
VectorFeatures.OnboardingVariant.LEGACY -> error("Legacy is not supported by the FTUE")
|
||||
VectorFeatures.OnboardingVariant.FTUE_AUTH -> FtueAuthVariant(
|
||||
views = activity.getBinding(),
|
||||
views = views,
|
||||
onboardingViewModel = onboardingViewModel.value,
|
||||
activity = activity,
|
||||
supportFragmentManager = activity.supportFragmentManager
|
||||
)
|
||||
VectorFeatures.OnboardingVariant.LOGIN_2 -> Login2Variant(
|
||||
views = activity.getBinding(),
|
||||
views = views,
|
||||
loginViewModel = loginViewModel2.value,
|
||||
activity = activity,
|
||||
supportFragmentManager = activity.supportFragmentManager
|
||||
|
|
Loading…
Reference in a new issue