From a474a9490f48be70ca19176fca4c94520da368f4 Mon Sep 17 00:00:00 2001 From: Shivansh Sharma Date: Thu, 5 Dec 2024 23:41:21 +0530 Subject: [PATCH] Make topic headers case-insensitive Topics in Zulip are case-insensitive. This change makes the message list's topic headers match that behavior, so messages whose topics differ only in case (like "missing string" and "Missing string") share a single header. This brings the behavior in line with Zulip web. ### What is the change? The change modifies the topic comparison logic in `haveSameRecipient()` to use case-insensitive comparison when determining whether to show a new recipient header. Fixes #739 --- lib/model/message_list.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/message_list.dart b/lib/model/message_list.dart index 73f15265f9..5020f99b38 100644 --- a/lib/model/message_list.dart +++ b/lib/model/message_list.dart @@ -321,7 +321,7 @@ mixin _MessageSequence { bool haveSameRecipient(Message prevMessage, Message message) { if (prevMessage is StreamMessage && message is StreamMessage) { if (prevMessage.streamId != message.streamId) return false; - if (prevMessage.topic != message.topic) return false; + if (prevMessage.topic.toLowerCase() != message.topic.toLowerCase()) return false; } else if (prevMessage is DmMessage && message is DmMessage) { if (!_equalIdSequences(prevMessage.allRecipientIds, message.allRecipientIds)) { return false;