1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3297 Spaces | Fix | Checking last opened space status on splash screen (#2060)

This commit is contained in:
Evgenii Kozlov 2025-02-03 20:24:04 +01:00 committed by Evgenii Kozlov
parent e13333c997
commit d88fd568db

View file

@ -326,22 +326,26 @@ class SplashViewModel(
.take(1)
}
.collect { view ->
val chat = view.chatId
if (chat.isNullOrEmpty() || !ChatConfig.isChatAllowed(space.id)) {
commands.emit(
Command.NavigateToWidgets(
space = space.id,
deeplink = deeplink
if (view.isActive) {
val chat = view.chatId
if (chat.isNullOrEmpty() || !ChatConfig.isChatAllowed(space.id)) {
commands.emit(
Command.NavigateToWidgets(
space = space.id,
deeplink = deeplink
)
)
)
} else {
commands.emit(
Command.NavigateToSpaceLevelChat(
space = space.id,
chat = chat,
deeplink = deeplink
)
)
}
} else {
commands.emit(
Command.NavigateToSpaceLevelChat(
space = space.id,
chat = chat,
deeplink = deeplink
)
)
commands.emit(Command.NavigateToVault(deeplink))
}
}
} else {