File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,9 @@ function getOptionData({
242
242
result . policyID = report . policyID ;
243
243
result . stateNum = report . stateNum ;
244
244
result . statusNum = report . statusNum ;
245
- result . isUnread = ReportUtils . isUnread ( report ) ;
245
+ // When the only message of a report is deleted lastVisibileActionCreated is not reset leading to wrongly
246
+ // setting it Unread so we add additional condition here to avoid empty chat LHN from being bold.
247
+ result . isUnread = ReportUtils . isUnread ( report ) && ! ! report . lastActorAccountID ;
246
248
result . isUnreadWithMention = ReportUtils . isUnreadWithMention ( report ) ;
247
249
result . hasDraftComment = report . hasDraft ;
248
250
result . isPinned = report . isPinned ;
Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ function signInAndGetAppWithUnreadChat() {
229
229
lastVisibleActionCreated : reportAction9CreatedDate ,
230
230
lastMessageText : 'Test' ,
231
231
participantAccountIDs : [ USER_B_ACCOUNT_ID ] ,
232
+ lastActorAccountID : USER_B_ACCOUNT_ID ,
232
233
type : CONST . REPORT . TYPE . CHAT ,
233
234
} ) ;
234
235
const createdReportActionID = NumberUtils . rand64 ( ) ;
@@ -388,6 +389,7 @@ describe('Unread Indicators', () => {
388
389
lastReadTime : '' ,
389
390
lastVisibleActionCreated : DateUtils . getDBTime ( utcToZonedTime ( NEW_REPORT_FIST_MESSAGE_CREATED_DATE , 'UTC' ) . valueOf ( ) ) ,
390
391
lastMessageText : 'Comment 1' ,
392
+ lastActorAccountID : USER_C_ACCOUNT_ID ,
391
393
participantAccountIDs : [ USER_C_ACCOUNT_ID ] ,
392
394
type : CONST . REPORT . TYPE . CHAT ,
393
395
} ,
You can’t perform that action at this time.
0 commit comments