mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Remove incoming messages for read events. (#14352)
This prevents the incoming message banner from showing unnecessarily when reading a post and then navigating back to the unread list.
This commit is contained in:
parent
e70dd8e89c
commit
98dcbd214c
@ -152,12 +152,7 @@ const PrivateMessageTopicTrackingState = EmberObject.extend({
|
||||
case "read":
|
||||
this._modifyState(message.topic_id, message.payload);
|
||||
|
||||
if (
|
||||
this.filter === UNREAD_FILTER &&
|
||||
this._shouldDisplayMessageForInbox(message)
|
||||
) {
|
||||
this._notifyIncoming(message.topic_id);
|
||||
}
|
||||
break;
|
||||
case "unread":
|
||||
this._modifyState(message.topic_id, message.payload);
|
||||
|
||||
@ -178,6 +173,8 @@ const PrivateMessageTopicTrackingState = EmberObject.extend({
|
||||
) {
|
||||
this._notifyIncoming(message.topic_id);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -280,16 +280,6 @@ acceptance(
|
||||
);
|
||||
};
|
||||
|
||||
test("incoming read message on unread filter", async function (assert) {
|
||||
await visit("/u/charlie/messages/unread");
|
||||
|
||||
publishReadToMessageBus({ topicId: 1 });
|
||||
|
||||
await visit("/u/charlie/messages/unread"); // wait for re-render
|
||||
|
||||
assert.ok(exists(".show-mores"), `displays the topic incoming info`);
|
||||
});
|
||||
|
||||
test("incoming group archive message acted by current user", async function (assert) {
|
||||
await visit("/u/charlie/messages");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user