diff --git a/app/assets/javascripts/discourse/app/controllers/user-private-messages-group.js b/app/assets/javascripts/discourse/app/controllers/user-private-messages-group.js index 2a6aa3f5ae4..edbcc89ecce 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-private-messages-group.js +++ b/app/assets/javascripts/discourse/app/controllers/user-private-messages-group.js @@ -11,7 +11,8 @@ export default class extends Controller { @computed( "pmTopicTrackingState.newIncoming.[]", - "pmTopicTrackingState.statesModificationCounter" + "pmTopicTrackingState.statesModificationCounter", + "pmTopicTrackingState.isTracking" ) get newLinkText() { return this.#linkText("new"); @@ -19,7 +20,8 @@ export default class extends Controller { @computed( "pmTopicTrackingState.newIncoming.[]", - "pmTopicTrackingState.statesModificationCounter" + "pmTopicTrackingState.statesModificationCounter", + "pmTopicTrackingState.isTracking" ) get unreadLinkText() { return this.#linkText("unread"); diff --git a/app/assets/javascripts/discourse/app/controllers/user-private-messages-user.js b/app/assets/javascripts/discourse/app/controllers/user-private-messages-user.js index 7669910017b..470cd0036b6 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-private-messages-user.js +++ b/app/assets/javascripts/discourse/app/controllers/user-private-messages-user.js @@ -22,7 +22,8 @@ export default class extends Controller { @computed( "pmTopicTrackingState.newIncoming.[]", - "pmTopicTrackingState.statesModificationCounter" + "pmTopicTrackingState.statesModificationCounter", + "pmTopicTrackingState.isTracking" ) get newLinkText() { return this.#linkText("new"); @@ -30,7 +31,8 @@ export default class extends Controller { @computed( "pmTopicTrackingState.newIncoming.[]", - "pmTopicTrackingState.statesModificationCounter" + "pmTopicTrackingState.statesModificationCounter", + "pmTopicTrackingState.isTracking" ) get unreadLinkText() { return this.#linkText("unread"); diff --git a/app/assets/javascripts/discourse/app/routes/user-private-messages.js b/app/assets/javascripts/discourse/app/routes/user-private-messages.js index 23d9c01b605..b0518dfcba1 100644 --- a/app/assets/javascripts/discourse/app/routes/user-private-messages.js +++ b/app/assets/javascripts/discourse/app/routes/user-private-messages.js @@ -8,12 +8,8 @@ export default DiscourseRoute.extend({ templateName: "user/messages", composer: service(), - model() { - return this.modelFor("user"); - }, - afterModel() { - return this.pmTopicTrackingState.startTracking(); + this.pmTopicTrackingState.startTracking(); }, setupController() {