From e130fb56028e60d689ca08fecfe915ef6fd611fe Mon Sep 17 00:00:00 2001 From: Evgenii Kozlov Date: Mon, 26 May 2025 18:47:23 +0200 Subject: [PATCH] DROID-3622 Widgets | Fix | Emit "Chat" widget placeholder immediately (#2464) --- .../presentation/widgets/SpaceChatWidgetContainer.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/widgets/SpaceChatWidgetContainer.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/widgets/SpaceChatWidgetContainer.kt index eb24196218..a1d6f5328c 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/widgets/SpaceChatWidgetContainer.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/widgets/SpaceChatWidgetContainer.kt @@ -10,6 +10,7 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emitAll import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.onStart class SpaceChatWidgetContainer @Inject constructor( private val widget: Widget, @@ -32,6 +33,14 @@ class SpaceChatWidgetContainer @Inject constructor( unreadMentionCount = unreadMentionCount ) } + .onStart { + emit( + WidgetView.SpaceChat( + id = widget.id, + source = widget.source + ) + ) + } ) }.catch { emit(