mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
widgets: Cache event handler instead of entire jquery for each widget.
In 61b3c698af we stopped restoring widgets
from the cache, so the only purpose of the cache remaining was to access
the event handler patched onto the widget jquery.
Now instead of the entire jquery object, we cache just the event handler
since that's the only thing we need from the cache, and do not patch it
onto the widget jquery object.
This commit is contained in:
@@ -89,7 +89,7 @@ export function get_message_events(message: Message): SubmessageEvents | undefin
|
||||
}
|
||||
|
||||
export function process_widget_rows_in_list(list: MessageList | undefined): void {
|
||||
for (const message_id of widgetize.widget_contents.keys()) {
|
||||
for (const message_id of widgetize.widget_event_handlers.keys()) {
|
||||
if (list?.get(message_id) !== undefined) {
|
||||
process_submessages({message_id, $row: list.get_row(message_id)});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user