pm_list: Move throttled update function.

Move it inside `initialize` function so that we can call it after
we restored DM collapsed status from localstorage.
This commit is contained in:
Aman Agrawal 2024-11-20 09:09:50 +05:30
parent 6c981d9385
commit 0c9c8c5500
1 changed files with 1 additions and 2 deletions

View File

@ -228,9 +228,8 @@ export function clear_search(force_rerender = false): void {
$filter.trigger("blur");
}
const throttled_update_private_message = _.throttle(update_private_messages, 50);
export function initialize(): void {
const throttled_update_private_message = _.throttle(update_private_messages, 50);
$(".direct-messages-container").on("click", "#show-more-direct-messages", (e) => {
e.stopPropagation();
e.preventDefault();