From fe859c96b2868b1271e815685f86b1369a9dba94 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Sat, 18 May 2024 22:13:10 +0700 Subject: [PATCH 1/3] fix: group chat with one member shows in start chat list --- src/libs/OptionsListUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 544ced533e82d..c048db6d08e39 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -724,7 +724,7 @@ function createOption( result.tooltipText = ReportUtils.getReportParticipantsTitle(visibleParticipantAccountIDs); result.isOneOnOneChat = isOneOnOneChat; - hasMultipleParticipants = personalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat; + hasMultipleParticipants = personalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat || ReportUtils.isGroupChat(result); subtitle = ReportUtils.getChatRoomSubtitle(report); const lastActorDetails = personalDetailMap[report.lastActorAccountID ?? 0] ?? null; From c36f29b16a99ecd6abe09d1af34a279370681211 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Sat, 18 May 2024 22:34:25 +0700 Subject: [PATCH 2/3] use report instead of result --- src/libs/OptionsListUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index c048db6d08e39..04763efdeffc0 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -724,7 +724,7 @@ function createOption( result.tooltipText = ReportUtils.getReportParticipantsTitle(visibleParticipantAccountIDs); result.isOneOnOneChat = isOneOnOneChat; - hasMultipleParticipants = personalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat || ReportUtils.isGroupChat(result); + hasMultipleParticipants = personalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat || ReportUtils.isGroupChat(report); subtitle = ReportUtils.getChatRoomSubtitle(report); const lastActorDetails = personalDetailMap[report.lastActorAccountID ?? 0] ?? null; @@ -1878,6 +1878,7 @@ function getOptions( // Skip if we aren't including multiple participant reports and this report has multiple participants if (!isCurrentUserOwnedPolicyExpenseChatThatCouldShow && !includeMultipleParticipantReports && !reportOption.login) { + console.log(reportOption); continue; } From 3a3c9a75efc0be76e3cab39465898b378613ac47 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Sat, 18 May 2024 22:45:05 +0700 Subject: [PATCH 3/3] fix lint --- src/libs/OptionsListUtils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 04763efdeffc0..0363bec9a41fa 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1878,7 +1878,6 @@ function getOptions( // Skip if we aren't including multiple participant reports and this report has multiple participants if (!isCurrentUserOwnedPolicyExpenseChatThatCouldShow && !includeMultipleParticipantReports && !reportOption.login) { - console.log(reportOption); continue; }