Skip to content

Commit

Permalink
Merge pull request #43665 from suneox/42068-update-unread-condition
Browse files Browse the repository at this point in the history
update last read time for empty report task
  • Loading branch information
AndrewGable authored Jun 25, 2024
2 parents a66eb7c + 5dbb17a commit e2a8a07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,14 @@ function ReportScreen({
});
}, [isInaccessibleWhisper]);

useEffect(() => {
if (!!report.lastReadTime || !ReportUtils.isTaskReport(report)) {
return;
}
// After creating the task report then navigating to task detail we don't have any report actions and the last read time is empty so We need to update the initial last read time when opening the task report detail.
Report.readNewestAction(report.reportID);
}, [report]);

if ((!isInaccessibleWhisper && isLinkedReportActionDeleted) ?? (!shouldShowSkeleton && reportActionIDFromRoute && reportActions?.length === 0 && !isLinkingToMessage)) {
return (
<BlockingView
Expand Down

0 comments on commit e2a8a07

Please sign in to comment.