mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
extracting the personalization complete emitting to a dedicated function
This commit is contained in:
parent
d89cc71eb4
commit
c2fe669670
1 changed files with 6 additions and 2 deletions
|
@ -159,7 +159,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
|||
OnboardingAction.ClearHomeServerHistory -> handleClearHomeServerHistory()
|
||||
is OnboardingAction.UpdateDisplayName -> updateDisplayName(action.displayName)
|
||||
OnboardingAction.UpdateDisplayNameSkipped -> handleDisplayNameStepComplete()
|
||||
OnboardingAction.UpdateProfilePictureSkipped -> _viewEvents.post(OnboardingViewEvents.OnPersonalizationComplete)
|
||||
OnboardingAction.UpdateProfilePictureSkipped -> completePersonalization()
|
||||
OnboardingAction.PersonalizeProfile -> handlePersonalizeProfile()
|
||||
is OnboardingAction.ProfilePictureSelected -> handleProfilePictureSelected(action)
|
||||
OnboardingAction.SaveSelectedProfilePicture -> updateProfilePicture()
|
||||
|
@ -954,7 +954,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
|||
withPersonalisationState {
|
||||
when {
|
||||
it.supportsChangingProfilePicture -> _viewEvents.post(OnboardingViewEvents.OnChooseProfilePicture)
|
||||
else -> _viewEvents.post(OnboardingViewEvents.OnPersonalizationComplete)
|
||||
else -> completePersonalization()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1000,6 +1000,10 @@ class OnboardingViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
private fun onProfilePictureSaved() {
|
||||
completePersonalization()
|
||||
}
|
||||
|
||||
private fun completePersonalization() {
|
||||
_viewEvents.post(OnboardingViewEvents.OnPersonalizationComplete)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue