Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

topic_list: Add method to check if topic list is empty.

Aman Agrawal88f71f28cc07
diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts
index d5ab4e8f5af..21ce7399daa 100644
--- a/web/src/topic_list.ts
+++ b/web/src/topic_list.ts
@@ -232,6 +232,11 @@ export class TopicListWidget {
this.prior_dom = new_dom;
}
+
+ is_empty(): boolean {
+ const $topic_list = this.$parent_elem.find(".topic-list");
+ return !$topic_list.hasClass("topic-list-has-topics");
+ }
}
export function clear_topic_search(e: JQuery.Event): void {