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.

unread_ui: Cut dependency on unread_ops.js.

Tim Abbott2de9db930539
diff --git a/web/src/ui_init.js b/web/src/ui_init.js
index e1b2148dca7..d0cbd97f62c 100644
--- a/web/src/ui_init.js
+++ b/web/src/ui_init.js
@@ -701,7 +701,7 @@ export function initialize_everything() {
// All overlays must be initialized before hashchange.js
hashchange.initialize();
- unread_ui.initialize();
+ unread_ui.initialize({notify_server_messages_read: unread_ops.notify_server_messages_read});
activity.initialize();
emoji_picker.initialize();
pm_list.initialize();
diff --git a/web/src/unread_ui.js b/web/src/unread_ui.js
index 93bc3d69fcd..77ebe4bdfd9 100644
--- a/web/src/unread_ui.js
+++ b/web/src/unread_ui.js
@@ -15,7 +15,6 @@ import * as stream_list from "./stream_list";
import * as top_left_corner from "./top_left_corner";
import * as topic_list from "./topic_list";
import * as unread from "./unread";
-import {notify_server_messages_read} from "./unread_ops";
import {user_settings} from "./user_settings";
let user_closed_unread_banner = false;
@@ -124,7 +123,7 @@ export function should_display_bankruptcy_banner() {
return false;
}
-export function initialize() {
+export function initialize({notify_server_messages_read}) {
const skip_animations = true;
update_unread_counts(skip_animations);
$("body").on("click", "#mark_view_read", () => {