This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/pre-initializers
Alan Guo Xiang Tan fc1fd1b416
FEATURE: Display new/unread count in browse more messages for PMs. (#14188)
In order to include the new/unread count in the browse more message
under suggested topics, a couple of technical changes have to be made.

1. `PrivateMessageTopicTrackingState` is now auto-injected which is
   similar to how it is done for `TopicTrackingState`. This is done so
we don't have to attempt to pass the `PrivateMessageTopicTrackingState`
object multiple levels down into the suggested-topics component. While
the object is auto-injected, we only fetch the initial state and start
tracking when the relevant private messages routes has been hit and only
when a private message's suggested topics is loaded. This is
done as we do not want to add the extra overhead of fetching the inital
state to all page loads but instead wait till the private messages
routes are hit.

2. Previously, we would stop tracking once the `user-private-messages`
   route has been deactivated. However, that is not ideal since
navigating out of the route and back means we send an API call to the
server each time. Since `PrivateMessageTopicTrackingState` is kept in
sync cheaply via messageBus, we can just continue to track the state
even if the user has navigated away from the relevant stages.
2021-09-07 12:30:40 +08:00
..
discourse-bootstrap.js FIX: Allow file-change events soon after reloading (#13065) 2021-05-14 12:36:53 -04:00
dynamic-route-builders.js FEATURE: add period filter in top topics route for tags. (#13415) 2021-07-06 15:25:11 +05:30
inject-discourse-objects.js FEATURE: Display new/unread count in browse more messages for PMs. (#14188) 2021-09-07 12:30:40 +08:00
map-routes.js DEV: Sync up more Ember CLI features (#11790) 2021-01-21 15:55:39 -05:00
register-dom-templates.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
sniff-capabilities.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
svg-sprite-fontawesome.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
theme-errors-handler.js DEV: Remove cache option from ajax() (#13142) 2021-05-31 14:41:35 +02:00