Skip to content

Commit

Permalink
messages: Show headers if is_search_narrow().
Browse files Browse the repository at this point in the history
Previously, when text searching, messages appear
adjacently under the same heading, this can be confusing since they
appear sequentially but there may be messages inbetween that don't meet
the search criteria. Fixes part of zulip#1550.
  • Loading branch information
u7327620 committed Oct 23, 2024
1 parent 0902171 commit f4f32d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zulipterminal/ui_tools/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@ def need_recipient_header(self) -> bool:
return False
if len(self.model.narrow) == 2 and self.model.narrow[1][0] == "topic":
return False

if self.model.is_search_narrow():
return True
if len(self.model.narrow) == 1:
return True
if len(self.model.narrow) == 2:
return not self.message["type"] == "private"
if len(self.model.narrow) == 3:
return not self.model.narrow[1][0] == "topic"

last_msg = self.last_message
if self.message["type"] == "stream":
Expand Down

0 comments on commit f4f32d5

Please sign in to comment.