PERF: Only subscribe to `/new` when logged in (#16028)
The 'new' tab doesn't exist for anonymous users. Every 'new' topic also publishes a message on the `/latest` channel, so the blue banner at the top of the topic-list will still be functional
This commit is contained in:
parent
e4d10a1f5f
commit
3712c958fa
|
@ -65,9 +65,9 @@ const TopicTrackingState = EmberObject.extend({
|
|||
* @method establishChannels
|
||||
*/
|
||||
establishChannels() {
|
||||
this.messageBus.subscribe("/new", this._processChannelPayload);
|
||||
this.messageBus.subscribe("/latest", this._processChannelPayload);
|
||||
if (this.currentUser) {
|
||||
this.messageBus.subscribe("/new", this._processChannelPayload);
|
||||
this.messageBus.subscribe(`/unread`, this._processChannelPayload);
|
||||
this.messageBus.subscribe(
|
||||
`/unread/${this.currentUser.id}`,
|
||||
|
|
Loading…
Reference in New Issue