From 61b4558140ce88843f33041b1d33d168a1a3414e Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 10 Nov 2023 13:59:16 -0800 Subject: [PATCH] Mark onboarding story read again, even if it's not unread --- ts/state/ducks/stories.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ts/state/ducks/stories.ts b/ts/state/ducks/stories.ts index 5a43b02f4e6..ecbb9b45074 100644 --- a/ts/state/ducks/stories.ts +++ b/ts/state/ducks/stories.ts @@ -380,13 +380,6 @@ function markStoryRead( return; } - if (matchingStory.readStatus !== ReadStatus.Unread) { - log.warn( - `markStoryRead: not unread, ${messageId} read status: ${matchingStory.readStatus}` - ); - return; - } - const message = await __DEPRECATED$getMessageById(messageId); if (!message) { @@ -416,6 +409,13 @@ function markStoryRead( ); } + if (matchingStory.readStatus !== ReadStatus.Unread) { + log.warn( + `markStoryRead: not unread, ${messageId} read status: ${matchingStory.readStatus}` + ); + return; + } + const storyReadDate = Date.now(); message.set(markViewed(message.attributes, storyReadDate));