diff --git a/src/components/OptionRow.tsx b/src/components/OptionRow.tsx index c72cdd1fd898..90ccff47b2b9 100644 --- a/src/components/OptionRow.tsx +++ b/src/components/OptionRow.tsx @@ -154,14 +154,14 @@ function OptionRow({ } return ( - - - {(hovered) => ( + + {(hovered) => ( + )} - )} - - + + )} + ); } diff --git a/src/libs/actions/Policy.ts b/src/libs/actions/Policy.ts index 0c6bd7682add..3c34e823ac9a 100644 --- a/src/libs/actions/Policy.ts +++ b/src/libs/actions/Policy.ts @@ -780,15 +780,12 @@ function removeOptimisticAnnounceRoomMembers(policyID: string, accountIDs: numbe } if (announceReport?.participantAccountIDs) { - const remainUsers = announceReport.participantAccountIDs.filter((e) => !accountIDs.includes(e)); const pendingChatMembers = ReportUtils.getPendingChatMembers(accountIDs, announceReport?.pendingChatMembers ?? [], CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE); announceRoomMembers.onyxOptimisticData.push({ onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${announceReport.reportID}`, value: { - participantAccountIDs: [...remainUsers], - visibleChatMemberAccountIDs: [...remainUsers], pendingChatMembers, }, }); @@ -797,8 +794,6 @@ function removeOptimisticAnnounceRoomMembers(policyID: string, accountIDs: numbe onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${announceReport.reportID}`, value: { - participantAccountIDs: announceReport.participantAccountIDs, - visibleChatMemberAccountIDs: announceReport.visibleChatMemberAccountIDs, pendingChatMembers: announceReport?.pendingChatMembers ?? null, }, }); diff --git a/src/pages/ReportParticipantsPage.tsx b/src/pages/ReportParticipantsPage.tsx index 66ff4e0602ba..0e3a6a834940 100755 --- a/src/pages/ReportParticipantsPage.tsx +++ b/src/pages/ReportParticipantsPage.tsx @@ -50,7 +50,7 @@ const getAllParticipants = ( !!userPersonalDetail?.login && !CONST.RESTRICTED_ACCOUNT_IDS.includes(accountID) ? LocalePhoneNumber.formatPhoneNumber(userPersonalDetail.login) : translate('common.hidden'); const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(userPersonalDetail); - const pendingChatMember = report?.pendingChatMembers?.find((member) => member.accountID === accountID.toString()); + const pendingChatMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString()); return { alternateText: userLogin, pendingAction: pendingChatMember?.pendingAction, diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index b64404f88138..d025a3bde265 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -198,7 +198,7 @@ function RoomMembersPage({report, session, policies}: RoomMembersPageProps) { return; } } - const pendingChatMember = report?.pendingChatMembers?.find((member) => member.accountID === accountID.toString()); + const pendingChatMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString()); result.push({ keyForList: String(accountID),