refactor: Extract narrow_banner module.

This is a mostly verbatim extraction.

I re-phrased one line of code to work around a lint
false alarm. (Look for `preamble` in the diff.)

There are about 8 lines missing coverage here, so
the new module might be a good candidate to get
100% line coverage on.

Before this change, you would need to remove 74
edges from our dependency graph to make it
acyclic. Now it's 72.
This commit is contained in:
Steve Howell
2021-03-26 14:21:47 +00:00
committed by Tim Abbott
parent e72f208fde
commit c67f82b073
8 changed files with 220 additions and 220 deletions

View File

@@ -6,7 +6,7 @@ import * as hash_util from "./hash_util";
import * as loading from "./loading";
import * as message_fetch from "./message_fetch";
import * as message_viewport from "./message_viewport";
import * as narrow from "./narrow";
import * as narrow_banner from "./narrow_banner";
import * as narrow_state from "./narrow_state";
import * as recent_topics from "./recent_topics";
import * as unread_ops from "./unread_ops";
@@ -65,7 +65,7 @@ export function hide_indicators() {
export function show_history_limit_notice() {
$(".top-messages-logo").hide();
$(".history-limited-box").show();
narrow.hide_empty_narrow_message();
narrow_banner.hide_empty_narrow_message();
}
export function hide_history_limit_notice() {