mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +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 {
|
class OnboardingActivity : VectorBaseActivity<ActivityLoginBinding>(), ToolbarConfigurable, UnlockedActivity {
|
||||||
|
|
||||||
private val onboardingVariant by lifecycleAwareLazy {
|
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
|
@Inject lateinit var onboardingVariantFactory: OnboardingVariantFactory
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package im.vector.app.features.onboarding
|
package im.vector.app.features.onboarding
|
||||||
|
|
||||||
|
import im.vector.app.databinding.ActivityLoginBinding
|
||||||
import im.vector.app.features.VectorFeatures
|
import im.vector.app.features.VectorFeatures
|
||||||
import im.vector.app.features.login2.LoginViewModel2
|
import im.vector.app.features.login2.LoginViewModel2
|
||||||
import im.vector.app.features.onboarding.ftueauth.FtueAuthVariant
|
import im.vector.app.features.onboarding.ftueauth.FtueAuthVariant
|
||||||
|
@ -26,18 +27,19 @@ class OnboardingVariantFactory @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun create(activity: OnboardingActivity,
|
fun create(activity: OnboardingActivity,
|
||||||
|
views: ActivityLoginBinding,
|
||||||
onboardingViewModel: Lazy<OnboardingViewModel>,
|
onboardingViewModel: Lazy<OnboardingViewModel>,
|
||||||
loginViewModel2: Lazy<LoginViewModel2>
|
loginViewModel2: Lazy<LoginViewModel2>
|
||||||
) = when (vectorFeatures.onboardingVariant()) {
|
) = when (vectorFeatures.onboardingVariant()) {
|
||||||
VectorFeatures.OnboardingVariant.LEGACY -> error("Legacy is not supported by the FTUE")
|
VectorFeatures.OnboardingVariant.LEGACY -> error("Legacy is not supported by the FTUE")
|
||||||
VectorFeatures.OnboardingVariant.FTUE_AUTH -> FtueAuthVariant(
|
VectorFeatures.OnboardingVariant.FTUE_AUTH -> FtueAuthVariant(
|
||||||
views = activity.getBinding(),
|
views = views,
|
||||||
onboardingViewModel = onboardingViewModel.value,
|
onboardingViewModel = onboardingViewModel.value,
|
||||||
activity = activity,
|
activity = activity,
|
||||||
supportFragmentManager = activity.supportFragmentManager
|
supportFragmentManager = activity.supportFragmentManager
|
||||||
)
|
)
|
||||||
VectorFeatures.OnboardingVariant.LOGIN_2 -> Login2Variant(
|
VectorFeatures.OnboardingVariant.LOGIN_2 -> Login2Variant(
|
||||||
views = activity.getBinding(),
|
views = views,
|
||||||
loginViewModel = loginViewModel2.value,
|
loginViewModel = loginViewModel2.value,
|
||||||
activity = activity,
|
activity = activity,
|
||||||
supportFragmentManager = activity.supportFragmentManager
|
supportFragmentManager = activity.supportFragmentManager
|
||||||
|
|
Loading…
Reference in a new issue