unread_ui: Cut dependency on unread_ops.js.

This commit is contained in:
Tim Abbott
2023-05-31 16:49:05 -07:00
parent 9d8b680f53
commit 2de9db9305
2 changed files with 2 additions and 3 deletions

View File

@@ -701,7 +701,7 @@ export function initialize_everything() {
// All overlays must be initialized before hashchange.js // All overlays must be initialized before hashchange.js
hashchange.initialize(); hashchange.initialize();
unread_ui.initialize(); unread_ui.initialize({notify_server_messages_read: unread_ops.notify_server_messages_read});
activity.initialize(); activity.initialize();
emoji_picker.initialize(); emoji_picker.initialize();
pm_list.initialize(); pm_list.initialize();

View File

@@ -15,7 +15,6 @@ import * as stream_list from "./stream_list";
import * as top_left_corner from "./top_left_corner"; import * as top_left_corner from "./top_left_corner";
import * as topic_list from "./topic_list"; import * as topic_list from "./topic_list";
import * as unread from "./unread"; import * as unread from "./unread";
import {notify_server_messages_read} from "./unread_ops";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings";
let user_closed_unread_banner = false; let user_closed_unread_banner = false;
@@ -124,7 +123,7 @@ export function should_display_bankruptcy_banner() {
return false; return false;
} }
export function initialize() { export function initialize({notify_server_messages_read}) {
const skip_animations = true; const skip_animations = true;
update_unread_counts(skip_animations); update_unread_counts(skip_animations);
$("body").on("click", "#mark_view_read", () => { $("body").on("click", "#mark_view_read", () => {