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

DROID-3662 Chats | Enhancement | Introduce system widget "Chat" + navigation changes (additions) (#2420)

This commit is contained in:
Evgenii Kozlov 2025-05-21 13:19:44 +02:00
parent 5bddcd640c
commit 3654ffcadb

View file

@ -392,21 +392,32 @@ class SplashViewModel(
if (view != null) {
if (view.isActive || view.isLoading) {
val chat = view.chatId
if (chat.isNullOrEmpty() || !ChatConfig.isChatAllowed(space.id)) {
commands.emit(
Command.NavigateToWidgets(
space = space.id,
deeplink = deeplink
when {
chat.isNullOrEmpty() || !ChatConfig.isChatAllowed(space.id) -> {
commands.emit(
Command.NavigateToWidgets(
space = space.id,
deeplink = deeplink
)
)
)
} else if (view.spaceType == SpaceType.CHAT) {
commands.emit(
Command.NavigateToSpaceLevelChat(
space = space.id,
chat = chat,
deeplink = deeplink
}
view.spaceType == SpaceType.CHAT -> {
commands.emit(
Command.NavigateToSpaceLevelChat(
space = space.id,
chat = chat,
deeplink = deeplink
)
)
)
}
else -> {
commands.emit(
Command.NavigateToWidgets(
space = space.id,
deeplink = deeplink
)
)
}
}
} else {
commands.emit(Command.NavigateToVault(deeplink))