Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3734353
D5466.id17860.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5466.id17860.diff
View Options
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -50,6 +50,7 @@
relationshipAction,
} = props;
+ const viewerID = useSelector(state => state.currentUserInfo?.id);
const userStoreSearchIndex = useSelector(userStoreSearchIndexSelector);
const [userStoreSearchResults, setUserStoreSearchResults] = React.useState<
$ReadOnlySet<string>,
@@ -106,9 +107,13 @@
() =>
Object.keys(mergedUserInfos)
.map(userID => mergedUserInfos[userID])
- .filter(user => !excludedStatuses.has(user.relationshipStatus))
+ .filter(
+ user =>
+ user.id !== viewerID &&
+ !excludedStatuses.has(user.relationshipStatus),
+ )
.sort((user1, user2) => user1.username.localeCompare(user2.username)),
- [excludedStatuses, mergedUserInfos],
+ [excludedStatuses, mergedUserInfos, viewerID],
);
const [pendingUsersToAdd, setPendingUsersToAdd] = React.useState<
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 3:37 AM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2844264
Default Alt Text
D5466.id17860.diff (1 KB)
Attached To
Mode
D5466: [web] Don't display current user in UserList
Attached
Detach File
Event Timeline
Log In to Comment