mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
message_list: Avoid rerender of user sidebar when adding msgs.
Added methods to live update user sidebar when messages are added or removed from the message list without doing a complete rerender.
This commit is contained in:
@@ -10,6 +10,7 @@ import * as buddy_data from "./buddy_data.ts";
|
||||
import {buddy_list} from "./buddy_list.ts";
|
||||
import * as keydown_util from "./keydown_util.ts";
|
||||
import {ListCursor} from "./list_cursor.ts";
|
||||
import * as narrow_state from "./narrow_state.ts";
|
||||
import * as people from "./people.ts";
|
||||
import * as pm_list from "./pm_list.ts";
|
||||
import * as popovers from "./popovers.ts";
|
||||
@@ -96,6 +97,14 @@ export function redraw_user(user_id: number): void {
|
||||
update_presence_indicators();
|
||||
}
|
||||
|
||||
export function rerender_user_sidebar_participants(): void {
|
||||
if (!narrow_state.stream_id() || !narrow_state.topic()) {
|
||||
return;
|
||||
}
|
||||
|
||||
buddy_list.rerender_participants();
|
||||
}
|
||||
|
||||
export function check_should_redraw_new_user(user_id: number): boolean {
|
||||
if (realm.realm_presence_disabled) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user