mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 16:15:03 +00:00
animation on onboarding
This commit is contained in:
+17
-4
@@ -274,12 +274,20 @@ private fun AcceptConditionsButton(
|
||||
val r2 = chatController.setServerOperators(rh = chatModel.remoteHostId(), operators = enabledOperators)
|
||||
if (r2 != null) {
|
||||
chatModel.conditions.value = r2
|
||||
if (onboarding) { close() }
|
||||
continueToNextStep(onboarding, close)
|
||||
if (appPlatform.isDesktop || !onboarding) {
|
||||
if (onboarding) { close() }
|
||||
continueToNextStep(onboarding, close)
|
||||
} else {
|
||||
continueToSetNotificationsAfterAccept()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (onboarding) { close() }
|
||||
continueToNextStep(onboarding, close)
|
||||
if (appPlatform.isDesktop || !onboarding) {
|
||||
if (onboarding) { close() }
|
||||
continueToNextStep(onboarding, close)
|
||||
} else {
|
||||
continueToSetNotificationsAfterAccept()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -295,6 +303,11 @@ private fun continueToNextStep(onboarding: Boolean, close: () -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun continueToSetNotificationsAfterAccept() {
|
||||
appPrefs.onboardingStage.set(OnboardingStage.Step4_SetNotificationsMode)
|
||||
ModalManager.fullscreen.showModalCloseable(showClose = false) { SetNotificationsMode(chatModel) }
|
||||
}
|
||||
|
||||
private fun enabledOperators(operators: List<ServerOperator>, selectedOperatorIds: Set<Long>): List<ServerOperator>? {
|
||||
val ops = ArrayList(operators)
|
||||
if (ops.isNotEmpty()) {
|
||||
|
||||
+1
@@ -57,6 +57,7 @@ fun SetNotificationsMode(m: ChatModel) {
|
||||
onboarding = OnboardingStage.OnboardingComplete,
|
||||
onclick = {
|
||||
changeNotificationsMode(currentMode.value, m)
|
||||
ModalManager.fullscreen.closeModals()
|
||||
}
|
||||
)
|
||||
// Reserve space
|
||||
|
||||
Reference in New Issue
Block a user