mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 07:34:18 +08:00
5e0c95ed83
What is the problem? When constructing the "Messages" section in Sidebar, we call startTracking() on the pm-topic-tracking-state service in order to get the counts for new/unread for the private message inboxes for each user. However, this is unnecessary because the inboxes are in a collapsed state by default in the sidebar and are only expanded when the current route correspond to the inbox's route. Therefore, we can avoid calling startTracking() on the pm-topic-tracking-state service until an inbox's route is loaded. This allows us to cut out one extra request to the server on page load and defer it until it is necessarily. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |