Skip to content

Commit

Permalink
FEATURE: Show the incomming topics banner on the Unseen view (#14032)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPrigorshnev committed Aug 12, 2021
1 parent 45c9bbc commit bbc565c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,17 @@ const TopicTrackingState = EmberObject.extend({

// always count a new_topic as incoming
if (
["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 here
Expand Down
4 changes: 4 additions & 0 deletions config/locales/client.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bbc565c

Please sign in to comment.