Skip to content

Commit

Permalink
fix removed user isn't strikethrough-ed
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Mar 30, 2024
1 parent f08f76d commit 3ca25ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
22 changes: 11 additions & 11 deletions src/components/OptionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ function OptionRow({
}

return (
<OfflineWithFeedback
pendingAction={option.pendingAction}
errors={option.allReportErrors}
shouldShowErrorMessages={false}
needsOffscreenAlphaCompositing
>
<Hoverable>
{(hovered) => (
<Hoverable>
{(hovered) => (
<OfflineWithFeedback
pendingAction={option.pendingAction}
errors={option.allReportErrors}
shouldShowErrorMessages={false}
needsOffscreenAlphaCompositing
>
<PressableWithFeedback
nativeID={keyForList}
ref={pressableRef}
Expand Down Expand Up @@ -314,9 +314,9 @@ function OptionRow({
</View>
)}
</PressableWithFeedback>
)}
</Hoverable>
</OfflineWithFeedback>
</OfflineWithFeedback>
)}
</Hoverable>
);
}

Expand Down
5 changes: 0 additions & 5 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
});
Expand All @@ -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,
},
});
Expand Down

0 comments on commit 3ca25ee

Please sign in to comment.