Skip to content

Commit

Permalink
Merge pull request #35355 from tienifr/fix/31764
Browse files Browse the repository at this point in the history
Room settings-Members added/deleted in a room in offline mode are not grayed out/crossed
  • Loading branch information
deetergp authored Mar 20, 2024
2 parents bc89304 + e725167 commit 68a96ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2457,8 +2457,6 @@ function removeFromRoom(reportID: string, targetAccountIDs: number[]) {
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
participantAccountIDs: participantAccountIDsAfterRemoval,
visibleChatMemberAccountIDs: visibleChatMemberAccountIDsAfterRemoval,
pendingChatMembers,
},
},
Expand All @@ -2469,8 +2467,6 @@ function removeFromRoom(reportID: string, targetAccountIDs: number[]) {
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
participantAccountIDs: report?.participantAccountIDs,
visibleChatMemberAccountIDs: report?.visibleChatMemberAccountIDs,
pendingChatMembers: report?.pendingChatMembers ?? null,
},
},
Expand Down
8 changes: 6 additions & 2 deletions src/libs/mapChildrenFlat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import React from 'react';
* return modifiedChild;
* });
*/
const mapChildrenFlat = <T, C>(...args: Parameters<typeof React.Children.map<T, C>>) => {
const mappedChildren = React.Children.map(...args);
const mapChildrenFlat = <T, C>(element: C, fn: (child: C, index: number) => T) => {
if (typeof element === 'function') {
return element(false) as C;
}

const mappedChildren = React.Children.map(element, fn);

if (Array.isArray(mappedChildren) && mappedChildren.length === 1) {
return mappedChildren[0];
Expand Down

0 comments on commit 68a96ed

Please sign in to comment.