Skip to content

Commit 5b6e384

Browse files
committed
utils: Replace direct access to Model.narrow with functions.
This commit replaces all instances of direct usage of Model.narrow with respective functions.
1 parent 1fa1b2b commit 5b6e384

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zulipterminal/ui_tools/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def create_msg_box_list(
2020
"""
2121
MessageBox for every message displayed is created here.
2222
"""
23-
if not model.narrow and messages is None:
23+
if not model.get_narrow() and messages is None:
2424
messages = list(model.index["all_msg_ids"])
2525
if messages is not None:
2626
message_list = [model.index["messages"][id] for id in messages]
@@ -62,7 +62,7 @@ def is_muted(msg: Message, model: Any) -> bool:
6262
if msg["type"] == "private": # noqa: SIM114
6363
return False
6464
# In a topic narrow
65-
elif len(model.narrow) == 2:
65+
elif model.get_narrow_length() == 2:
6666
return False
6767
elif model.is_muted_stream(msg["stream_id"]): # noqa: SIM114
6868
return True

0 commit comments

Comments
 (0)