View next unread story improvements

This commit is contained in:
Josh Perez 2022-04-28 14:59:09 -04:00 committed by GitHub
parent 9d3498d938
commit 84411fee38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 4 deletions

View file

@ -2437,9 +2437,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
if (isStory(message.attributes)) {
attributes.hasPostedStory = true;
} else {
attributes.active_at = now;
}
attributes.active_at = now;
conversation.set(attributes);
if (
@ -2542,6 +2543,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
const isGroupStoryReply =
isGroup(conversation.attributes) && message.get('storyId');
if (
!isStory(message.attributes) &&
!isGroupStoryReply &&
(!conversationTimestamp ||
message.get('sent_at') > conversationTimestamp)