diff --git a/native/chat/settings/thread-settings-member-tooltip-modal.react.js b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
--- a/native/chat/settings/thread-settings-member-tooltip-modal.react.js
+++ b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
@@ -3,15 +3,8 @@
import * as React from 'react';
import { Alert } from 'react-native';
-import {
- removeUsersFromThread,
- changeThreadMemberRoles,
-} from 'lib/actions/thread-actions.js';
-import {
- memberIsAdmin,
- removeMemberFromThread,
- switchMemberAdminRoleInThread,
-} from 'lib/shared/thread-utils.js';
+import { removeUsersFromThread } from 'lib/actions/thread-actions.js';
+import { removeMemberFromThread } from 'lib/shared/thread-utils.js';
import { stringForUser } from 'lib/shared/user-utils.js';
import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types.js';
import {
@@ -65,47 +58,12 @@
}, [onConfirmRemoveUser, userText]);
}
-function useOnToggleAdmin(
+function useOnChangeRole(
+ // This is temporary until we implement the change role flow
+ // eslint-disable-next-line no-unused-vars
route: TooltipRoute<'ThreadSettingsMemberTooltipModal'>,
) {
- const { memberInfo, threadInfo } = route.params;
- const boundChangeThreadMemberRoles = useServerCall(changeThreadMemberRoles);
- const dispatchActionPromise = useDispatchActionPromise();
-
- const isCurrentlyAdmin = memberIsAdmin(memberInfo, threadInfo);
- const onConfirmMakeAdmin = React.useCallback(
- () =>
- switchMemberAdminRoleInThread(
- threadInfo,
- memberInfo,
- isCurrentlyAdmin,
- dispatchActionPromise,
- boundChangeThreadMemberRoles,
- ),
- [
- threadInfo,
- memberInfo,
- isCurrentlyAdmin,
- dispatchActionPromise,
- boundChangeThreadMemberRoles,
- ],
- );
-
- const userText = stringForUser(memberInfo);
- const actionClause = isCurrentlyAdmin
- ? `remove ${userText} as an admin`
- : `make ${userText} an admin`;
- return React.useCallback(() => {
- Alert.alert(
- 'Confirm action',
- `Are you sure you want to ${actionClause} of this chat?`,
- [
- { text: 'Cancel', style: 'cancel' },
- { text: 'OK', onPress: onConfirmMakeAdmin },
- ],
- { cancelable: true },
- );
- }, [onConfirmMakeAdmin, actionClause]);
+ return React.useCallback(() => {}, []);
}
function TooltipMenu(
@@ -113,29 +71,23 @@
): React.Node {
const { route, tooltipItem: TooltipItem } = props;
+ const onChangeRole = useOnChangeRole(route);
const onRemoveUser = useOnRemoveUser(route);
- const onToggleAdmin = useOnToggleAdmin(route);
return (
<>
+
-
-
>
);
}