Skip to content

Commit

Permalink
Merge pull request #39482 from bernhardoj/fix/39170-mark-as-unread-wh…
Browse files Browse the repository at this point in the history
…en-last-action-is-whisper

Fix unread message indicator not displayed after flagging message as offensive
  • Loading branch information
pecanoro authored Apr 16, 2024
2 parents ed7029b + 8b5871b commit c75c85f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,12 @@ function markCommentAsUnread(reportID: string, reportActionCreated: string) {

// Find the latest report actions from other users
const latestReportActionFromOtherUsers = Object.values(reportActions ?? {}).reduce((latest: ReportAction | null, current: ReportAction) => {
if (current.actorAccountID !== currentUserAccountID && (!latest || current.created > latest.created)) {
if (
current.actorAccountID !== currentUserAccountID &&
(!latest || current.created > latest.created) &&
// Whisper action doesn't affect lastVisibleActionCreated, so skip whisper action except actionable mention whisper
(!ReportActionsUtils.isWhisperAction(current) || current.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLEMENTIONWHISPER)
) {
return current;
}
return latest;
Expand Down

0 comments on commit c75c85f

Please sign in to comment.