Page MenuHomePhabricator

D10159.id34201.diff
No OneTemporary

D10159.id34201.diff

diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -19,7 +19,6 @@
} from '../actions/message-actions.js';
import type { RemoveUsersFromThreadInput } from '../actions/thread-actions';
import {
- changeThreadMemberRolesActionTypes,
newThreadActionTypes,
removeUsersFromThreadActionTypes,
} from '../actions/thread-actions.js';
@@ -1531,38 +1530,6 @@
);
}
-function switchMemberAdminRoleInThread(
- threadInfo: ThreadInfo,
- memberInfo: RelativeMemberInfo,
- isCurrentlyAdmin: boolean,
- dispatchActionPromise: DispatchActionPromise,
- changeUserRoleServerCall: (
- threadID: string,
- memberIDs: $ReadOnlyArray<string>,
- newRole: string,
- ) => Promise<ChangeThreadSettingsPayload>,
-) {
- let newRole = null;
- for (const roleID in threadInfo.roles) {
- const role = threadInfo.roles[roleID];
- if (isCurrentlyAdmin && role.isDefault) {
- newRole = role.id;
- break;
- } else if (!isCurrentlyAdmin && roleIsAdminRole(role)) {
- newRole = role.id;
- break;
- }
- }
- invariant(newRole !== null, 'Could not find new role');
-
- const customKeyName = `${changeThreadMemberRolesActionTypes.started}:${memberInfo.id}`;
- dispatchActionPromise(
- changeThreadMemberRolesActionTypes,
- changeUserRoleServerCall(threadInfo.id, [memberInfo.id], newRole),
- { customKeyName },
- );
-}
-
function getAvailableThreadMemberActions(
memberInfo: RelativeMemberInfo,
threadInfo: ThreadInfo,
@@ -1845,7 +1812,6 @@
getThreadListSearchResults,
useThreadListSearch,
removeMemberFromThread,
- switchMemberAdminRoleInThread,
getAvailableThreadMemberActions,
threadMembersWithoutAddedAshoat,
patchThreadInfoToIncludeMentionedMembersOfParent,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 8:52 AM (18 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2567839
Default Alt Text
D10159.id34201.diff (1 KB)

Event Timeline