From 9a285f39222b82ff42c393f5ae1fa255b619c97f Mon Sep 17 00:00:00 2001 From: Alejandro Date: Fri, 20 Oct 2023 10:41:59 -0300 Subject: [PATCH] Turn off shimmer when empty chat --- .../src/main/java/chat/sphinx/chat_common/ui/ChatViewModel.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphinx/screens/chats/chat-common/chat-common/src/main/java/chat/sphinx/chat_common/ui/ChatViewModel.kt b/sphinx/screens/chats/chat-common/chat-common/src/main/java/chat/sphinx/chat_common/ui/ChatViewModel.kt index 5516fc33f9..792bfefca8 100644 --- a/sphinx/screens/chats/chat-common/chat-common/src/main/java/chat/sphinx/chat_common/ui/ChatViewModel.kt +++ b/sphinx/screens/chats/chat-common/chat-common/src/main/java/chat/sphinx/chat_common/ui/ChatViewModel.kt @@ -991,6 +991,10 @@ abstract class ChatViewModel( return } + if (chatId == null) { + shimmerViewState.updateViewState(ShimmerViewState.Off) + } + var isScrollDownButtonSetup = false messagesLoadJob = viewModelScope.launch(mainImmediate) { if (isThreadChat()) {