mirror of https://github.com/zulip/zulip.git
inbox_util: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
9ed74cbfcd
commit
a0656a6c56
|
@ -113,7 +113,7 @@ EXEMPT_FILES = make_set(
|
|||
"web/src/hotkey.js",
|
||||
"web/src/hotspots.js",
|
||||
"web/src/inbox_ui.js",
|
||||
"web/src/inbox_util.js",
|
||||
"web/src/inbox_util.ts",
|
||||
"web/src/info_overlay.js",
|
||||
"web/src/integration_url_modal.js",
|
||||
"web/src/invite.ts",
|
||||
|
|
|
@ -5,15 +5,15 @@ import * as stream_data from "./stream_data";
|
|||
|
||||
let is_inbox_visible = false;
|
||||
|
||||
export function set_visible(value) {
|
||||
export function set_visible(value: boolean): void {
|
||||
is_inbox_visible = value;
|
||||
}
|
||||
|
||||
export function is_visible() {
|
||||
export function is_visible(): boolean {
|
||||
return is_inbox_visible;
|
||||
}
|
||||
|
||||
export function update_stream_colors() {
|
||||
export function update_stream_colors(): void {
|
||||
if (!is_visible()) {
|
||||
return;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export function update_stream_colors() {
|
|||
const $stream_headers = $("#inbox-streams-container .inbox-header");
|
||||
$stream_headers.each((_index, stream_header) => {
|
||||
const $stream_header = $(stream_header);
|
||||
const stream_id = Number.parseInt($stream_header.attr("data-stream-id"), 10);
|
||||
const stream_id = Number.parseInt($stream_header.attr("data-stream-id")!, 10);
|
||||
if (!stream_id) {
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue