|
15 | 15 | from zulipterminal.config.keys import keys_for_command |
16 | 16 | from zulipterminal.helper import ( |
17 | 17 | Message, StreamData, asynch, canonicalize_color, canonicalize_topic, |
18 | | - classify_unread_counts, display_error_if_present, index_messages, |
19 | | - initial_index, notify, set_count, |
| 18 | + classify_unread_counts, compare_lowercase, display_error_if_present, |
| 19 | + index_messages, initial_index, notify, set_count, |
20 | 20 | ) |
21 | 21 | from zulipterminal.ui_tools.utils import create_msg_box_list |
22 | 22 |
|
@@ -911,7 +911,8 @@ def _handle_message_event(self, event: Event) -> None: |
911 | 911 | if (append_to_stream |
912 | 912 | and (len(self.narrow) == 1 |
913 | 913 | or (len(self.narrow) == 2 |
914 | | - and self.narrow[1][1] == message['subject']))): |
| 914 | + and compare_lowercase(self.narrow[1][1], |
| 915 | + message['subject'])))): |
915 | 916 | msg_log.append(msg_w) |
916 | 917 |
|
917 | 918 | elif (message['type'] == 'private' and len(self.narrow) == 1 |
@@ -1040,7 +1041,8 @@ def _update_rendered_view(self, msg_id: int) -> None: |
1040 | 1041 | # Remove the message if it no longer belongs in the current |
1041 | 1042 | # narrow. |
1042 | 1043 | if (len(self.narrow) == 2 |
1043 | | - and msg_box.message['subject'] != self.narrow[1][1]): |
| 1044 | + and not compare_lowercase(msg_box.message['subject'], |
| 1045 | + self.narrow[1][1])): |
1044 | 1046 | view.message_view.log.remove(msg_w) |
1045 | 1047 | # Change narrow if there are no messages left in the |
1046 | 1048 | # current narrow. |
|
0 commit comments