mirror of https://github.com/zulip/zulip.git
muted_users_ui: Convert module to TypeScript.
This commit is contained in:
parent
b7bf9e41c7
commit
8a13bbd953
|
@ -153,7 +153,7 @@ EXEMPT_FILES = make_set(
|
|||
"web/src/message_viewport.ts",
|
||||
"web/src/messages_overlay_ui.ts",
|
||||
"web/src/modals.ts",
|
||||
"web/src/muted_users_ui.js",
|
||||
"web/src/muted_users_ui.ts",
|
||||
"web/src/narrow.js",
|
||||
"web/src/narrow_history.ts",
|
||||
"web/src/narrow_title.ts",
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as channel from "./channel";
|
|||
import * as timerender from "./timerender";
|
||||
import {get_time_from_date_muted} from "./util";
|
||||
|
||||
type RawMutedUser = {
|
||||
export type RawMutedUser = {
|
||||
id: number;
|
||||
timestamp: number;
|
||||
};
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import * as activity_ui from "./activity_ui";
|
||||
import * as message_lists from "./message_lists";
|
||||
import * as muted_users from "./muted_users";
|
||||
import type {RawMutedUser} from "./muted_users";
|
||||
import * as overlays from "./overlays";
|
||||
import * as pm_list from "./pm_list";
|
||||
import * as popovers from "./popovers";
|
||||
import * as recent_view_ui from "./recent_view_ui";
|
||||
import * as settings_muted_users from "./settings_muted_users";
|
||||
|
||||
export function rerender_for_muted_user() {
|
||||
export function rerender_for_muted_user(): void {
|
||||
for (const msg_list of message_lists.all_rendered_message_lists()) {
|
||||
msg_list.update_muting_and_rerender();
|
||||
}
|
||||
|
@ -28,7 +29,7 @@ export function rerender_for_muted_user() {
|
|||
// mechanism.
|
||||
}
|
||||
|
||||
export function handle_user_updates(muted_user_ids) {
|
||||
export function handle_user_updates(muted_user_ids: RawMutedUser[]): void {
|
||||
popovers.hide_all();
|
||||
muted_users.set_muted_users(muted_user_ids);
|
||||
rerender_for_muted_user();
|
Loading…
Reference in New Issue