Skip to content

Commit 70cdb9e

Browse files
committed
model: Add function to expose narrow to other files.
This commit contains get_narrow() and get_narrow_length() which are used to provide data inside narrow and length of narrow respectively to other components of the codebase.
1 parent 7819dab commit 70cdb9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zulipterminal/model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ def unset_search_narrow(self) -> None:
341341
if self.is_search_narrow():
342342
self.narrow = [item for item in self.narrow if item[0] != "search"]
343343

344+
def get_narrow(self):
345+
return self.narrow
346+
347+
def get_narrow_length(self):
348+
return len(self.narrow)
349+
344350
def get_message_ids_in_current_narrow(self) -> Set[int]:
345351
narrow = self.narrow
346352
index = self.index

0 commit comments

Comments
 (0)