mirror of https://github.com/zulip/zulip.git
33af1c1cd6
It turns out that the bug this call hopes to fix only happens when the user first loads the page to recent_topics and then navigates to a view with a message list (any other view), but we'd make this call every time the recent topics table was hidden. Hence, this commit makes it such that we only make that call if (1) the page is loaded to recent_topics and (2) we're switching from recent_topics to a message list view for the first time. We achieve (1) via binding a handler via ui_init.initialize_everything and (2) by binding the handler as `.one`, so that it's unbound after its first invocation. Additionally, we use window.requestAnimationFrame to prevent this forcing the browser to do a reflow unnecessarily. Combined with other commits in this series, this fixes a major performance problem when leaving recent topics for another view. See #20255 for details. |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
images | ||
js | ||
shared | ||
styles | ||
templates | ||
third | ||
.gitignore |