From acaa597c908488efd9a2fb5c3b6474bd6d1f9fea Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:42:43 +0000 Subject: [PATCH] desktop, android: fix image not appearing in view when received (#3504) * desktop, android: fix image not appearing in view when received * change to KeyChangeEffect --- .../chat/simplex/common/views/chat/item/CIImageView.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIImageView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIImageView.kt index 8b0b2debca..1e5919c0b6 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIImageView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIImageView.kt @@ -164,6 +164,12 @@ fun CIImageView( } } } + } else { + KeyChangeEffect(file) { + if (res.value == null) { + res.value = imageAndFilePath(file) + } + } } val loaded = res.value if (loaded != null) {