From 775adaa0f72f16d85520aa8bdec2ccadcd18b7c3 Mon Sep 17 00:00:00 2001 From: Mehdi Alaoui Date: Fri, 20 Dec 2024 08:09:59 +0100 Subject: [PATCH] bug: fix a bug with dashboard screen --- .../main/java/com/arygm/quickfix/ui/dashboard/ChatWidget.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/arygm/quickfix/ui/dashboard/ChatWidget.kt b/app/src/main/java/com/arygm/quickfix/ui/dashboard/ChatWidget.kt index cad7e64d..3079fa0c 100644 --- a/app/src/main/java/com/arygm/quickfix/ui/dashboard/ChatWidget.kt +++ b/app/src/main/java/com/arygm/quickfix/ui/dashboard/ChatWidget.kt @@ -236,7 +236,8 @@ fun ChatItem( (chat.chatStatus == ChatStatus.WAITING_FOR_RESPONSE || chat.chatStatus == ChatStatus.GETTING_SUGGESTIONS)) { "Await confirmation from ${workerProfile.displayName}" - } else chat.messages.last().content, // Removed leading comma for clarity + } else if (chat.messages.isNotEmpty()) chat.messages.last().content + else "", // Removed leading comma for clarity modifier = Modifier.testTag( if (chat.messages.isEmpty()) "No messages"