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 b93faf0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zulipterminal/ui_tools/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ def need_recipient_header(self) -> bool:
if self.model.is_search_narrow():
return True

if self.model.is_search_narrow():
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":
return not (
Expand Down

0 comments on commit b93faf0

Please sign in to comment.