A platform for community discussion. Free, open, simple.
FEATURE: Show the incomming topics banner on the Unseen view (#14032)
Andrei Prigorshnevbbc565c9299d
diff --git a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js b/app/assets/javascripts/discourse/app/models/topic-tracking-state.jsindex fe62df3c2c3..3097cb5f0f4 100644--- a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js+++ b/app/assets/javascripts/discourse/app/models/topic-tracking-state.js@@ -213,14 +213,17 @@ const TopicTrackingState = EmberObject.extend({// always count a new_topic as incomingif (- ["all", "latest", "new"].includes(filter) &&+ ["all", "latest", "new", "unseen"].includes(filter) &&data.message_type === "new_topic") {this._addIncoming(data.topic_id);}// count an unread topic as incoming- if (["all", "unread"].includes(filter) && data.message_type === "unread") {+ if (+ ["all", "unread", "unseen"].includes(filter) &&+ data.message_type === "unread"+ ) {const old = this.findState(data);// the highest post number is equal to last read post number herediff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 6dd8a4bf5e0..c0a241fda1c 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -349,6 +349,10 @@ en:one: "See %{count} new or updated topic"other: "See %{count} new or updated topics"+ topic_count_unseen:+ one: "See %{count} new or updated topic"+ other: "See %{count} new or updated topics"+topic_count_unread:one: "See %{count} unread topic"other: "See %{count} unread topics"