Skip to content
Open
2 changes: 2 additions & 0 deletions zulipterminal/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def __init__(

self.active_conversation_info: Dict[str, Any] = {}
self.is_typing_notification_in_progress = False
self.is_in_empty_narrow = False

self.show_loading()
client_identifier = f"ZulipTerminal/{ZT_VERSION} {platform()}"
Expand Down Expand Up @@ -598,6 +599,7 @@ def _narrow_to(self, anchor: Optional[int], **narrow: Any) -> None:
if len(msg_id_list) == 0 or (anchor is not None and anchor not in msg_id_list):
self.model.get_messages(num_before=30, num_after=10, anchor=anchor)
msg_id_list = self.model.get_message_ids_in_current_narrow()
self.is_in_empty_narrow = bool(len(msg_id_list) == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this small commit factored out, so that it would cover Sumanth's original process here? Oh, I think you said that it was where the inspiration came from?

(I'm torn whether this belongs in the model or controller here, but that's probably a refactoring to consider how to structure the whole narrowing behavior)


w_list = create_msg_box_list(self.model, msg_id_list, focus_msg_id=anchor)

Expand Down