Skip to content

Commit 0790afb

Browse files
MelvinBotPujan92
andcommitted
Merge remote branch and resolve conflict in ReportActionsList
Resolved conflict by using unreadMarkerTime === '' check instead of prevReportLastReadTime to detect the empty-to-value transition. This avoids needing the extra usePrevious hook while achieving the same behavior. Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
2 parents 92f35fb + 495f991 commit 0790afb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/pages/inbox/report/ReportActionsList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ function ReportActionsList({
268268
// loaded yet after sign-in), update the marker so it uses the fresh value
269269
// instead of the empty string from initial mount.
270270
useEffect(() => {
271-
if (reportLastReadTime !== '' && unreadMarkerTime === '') {
272-
setUnreadMarkerTime(reportLastReadTime);
271+
if (reportLastReadTime === '' || unreadMarkerTime !== '') {
272+
return;
273273
}
274+
setUnreadMarkerTime(reportLastReadTime);
274275
// eslint-disable-next-line react-hooks/exhaustive-deps
275276
}, [reportLastReadTime]);
276277

0 commit comments

Comments
 (0)