Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
Move hide_mark_as_read_turned_off_banner to unread_ui from narrow.
evykassirera434b0ef1989
diff --git a/static/js/narrow.js b/static/js/narrow.jsindex 9c371cb1fe0..8ae31ad064b 100644--- a/static/js/narrow.js+++ b/static/js/narrow.js@@ -40,6 +40,7 @@ import * as typing_events from "./typing_events";import * as ui_util from "./ui_util";import * as unread from "./unread";import * as unread_ops from "./unread_ops";+import * as unread_ui from "./unread_ui";import * as util from "./util";import * as widgetize from "./widgetize";@@ -155,17 +156,13 @@ function update_narrow_title(filter) {}}-export function hide_mark_as_read_turned_off_banner() {- $("#mark_as_read_turned_off_banner").hide();-}-export function reset_ui_state() {// Resets the state of various visual UI elements that are// a function of the current narrow.narrow_banner.hide_empty_narrow_message();message_scroll.hide_top_of_narrow_notices();message_scroll.hide_indicators();- hide_mark_as_read_turned_off_banner();+ unread_ui.hide_mark_as_read_turned_off_banner();}export function handle_middle_pane_transition() {diff --git a/static/js/recent_topics_ui.js b/static/js/recent_topics_ui.jsindex 8bf2f4cdf74..bb2a26348b0 100644--- a/static/js/recent_topics_ui.js+++ b/static/js/recent_topics_ui.js@@ -29,6 +29,7 @@ import * as sub_store from "./sub_store";import * as timerender from "./timerender";import * as top_left_corner from "./top_left_corner";import * as unread from "./unread";+import * as unread_ui from "./unread_ui";let topics_widget;// Sets the number of avatars to display.@@ -651,7 +652,7 @@ export function show() {$("#message_view_header_underpadding").hide();$(".header").css("padding-bottom", "0px");- narrow.hide_mark_as_read_turned_off_banner();+ unread_ui.hide_mark_as_read_turned_off_banner();// We want to show `new stream message` instead of// `new topic`, which we are already doing in thisdiff --git a/static/js/unread_ui.js b/static/js/unread_ui.jsindex 461a7129397..dd2a657187b 100644--- a/static/js/unread_ui.js+++ b/static/js/unread_ui.js@@ -15,6 +15,10 @@ import {notify_server_messages_read} from "./unread_ops";let last_mention_count = 0;+export function hide_mark_as_read_turned_off_banner() {+ $("#mark_as_read_turned_off_banner").hide();+}+function do_new_messages_animation($li) {$li.addClass("new_messages");function mid_animation() {