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.

js: Convert static/js/topic_list_data.js to ES6 module.

Anders Kaseorg87f2fe2ccec8
diff --git a/static/js/bundles/app.js b/static/js/bundles/app.js
index c53bc57c1ab..8cafb151ac9 100644
--- a/static/js/bundles/app.js
+++ b/static/js/bundles/app.js
@@ -35,7 +35,6 @@ import "../message_viewport";
import "../rows";
import "../user_groups";
import "../unread";
-import "../topic_list_data";
import "../topic_list";
import "../pm_list_dom";
import "../pm_list";
diff --git a/static/js/topic_list_data.js b/static/js/topic_list_data.js
index b6ec930ac7b..6e5290f02b2 100644
--- a/static/js/topic_list_data.js
+++ b/static/js/topic_list_data.js
@@ -1,9 +1,7 @@
-"use strict";
-
const max_topics = 5;
const max_topics_with_unread = 8;
-exports.get_list_info = function (stream_id, zoomed) {
+export function get_list_info(stream_id, zoomed) {
let topics_selected = 0;
let more_topics_unreads = 0;
@@ -96,4 +94,4 @@ exports.get_list_info = function (stream_id, zoomed) {
num_possible_topics: topic_names.length,
more_topics_unreads,
};
-};
+}