Skip to content

Commit a474a94

Browse files
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
1 parent fb6291f commit a474a94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/model/message_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ mixin _MessageSequence {
321321
bool haveSameRecipient(Message prevMessage, Message message) {
322322
if (prevMessage is StreamMessage && message is StreamMessage) {
323323
if (prevMessage.streamId != message.streamId) return false;
324-
if (prevMessage.topic != message.topic) return false;
324+
if (prevMessage.topic.toLowerCase() != message.topic.toLowerCase()) return false;
325325
} else if (prevMessage is DmMessage && message is DmMessage) {
326326
if (!_equalIdSequences(prevMessage.allRecipientIds, message.allRecipientIds)) {
327327
return false;

0 commit comments

Comments
 (0)