Page MenuHomePhabricator

D9379.id31700.diff
No OneTemporary

D9379.id31700.diff

diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js
--- a/native/navigation/app-navigator.react.js
+++ b/native/navigation/app-navigator.react.js
@@ -21,7 +21,7 @@
ActionResultModalRouteName,
TextMessageTooltipModalRouteName,
ThreadSettingsMemberTooltipModalRouteName,
- RelationshipListItemTooltipModalRouteName,
+ UserRelationshipTooltipModalRouteName,
RobotextMessageTooltipModalRouteName,
ChatCameraModalRouteName,
VideoPlaybackModalRouteName,
@@ -41,7 +41,7 @@
import ThreadAvatarCameraModal from '../media/thread-avatar-camera-modal.react.js';
import UserAvatarCameraModal from '../media/user-avatar-camera-modal.react.js';
import VideoPlaybackModal from '../media/video-playback-modal.react.js';
-import RelationshipListItemTooltipModal from '../profile/relationship-list-item-tooltip-modal.react.js';
+import UserRelationshipTooltipModal from '../profile/user-relationship-tooltip-modal.react.js';
import PushHandler from '../push/push-handler.react.js';
import { getPersistor } from '../redux/persist.js';
import { RootContext } from '../root-context.js';
@@ -130,8 +130,8 @@
component={ThreadSettingsMemberTooltipModal}
/>
<App.Screen
- name={RelationshipListItemTooltipModalRouteName}
- component={RelationshipListItemTooltipModal}
+ name={UserRelationshipTooltipModalRouteName}
+ component={UserRelationshipTooltipModal}
/>
<App.Screen
name={RobotextMessageTooltipModalRouteName}
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -41,7 +41,7 @@
import type { ThreadAvatarCameraModalParams } from '../media/thread-avatar-camera-modal.react.js';
import type { VideoPlaybackModalParams } from '../media/video-playback-modal.react.js';
import type { CustomServerModalParams } from '../profile/custom-server-modal.react.js';
-import type { RelationshipListItemTooltipModalParams } from '../profile/relationship-list-item-tooltip-modal.react.js';
+import type { UserRelationshipTooltipModalParams } from '../profile/user-relationship-tooltip-modal.react.js';
import type { ChangeRolesScreenParams } from '../roles/change-roles-screen.react.js';
import type { CommunityRolesScreenParams } from '../roles/community-roles-screen.react.js';
import type { CreateRolesScreenParams } from '../roles/create-roles-screen.react.js';
@@ -94,8 +94,8 @@
export const PrivacyPreferencesRouteName = 'PrivacyPreferences';
export const ProfileRouteName = 'Profile';
export const ProfileScreenRouteName = 'ProfileScreen';
-export const RelationshipListItemTooltipModalRouteName =
- 'RelationshipListItemTooltipModal';
+export const UserRelationshipTooltipModalRouteName =
+ 'UserRelationshipTooltipModal';
export const RobotextMessageTooltipModalRouteName =
'RobotextMessageTooltipModal';
export const SecondaryDeviceQRCodeScannerRouteName =
@@ -176,7 +176,7 @@
+MultimediaMessageTooltipModal: MultimediaMessageTooltipModalParams,
+TextMessageTooltipModal: TextMessageTooltipModalParams,
+ThreadSettingsMemberTooltipModal: ThreadSettingsMemberTooltipModalParams,
- +RelationshipListItemTooltipModal: RelationshipListItemTooltipModalParams,
+ +UserRelationshipTooltipModal: UserRelationshipTooltipModalParams,
+RobotextMessageTooltipModal: RobotextMessageTooltipModalParams,
};
@@ -303,7 +303,7 @@
MultimediaMessageTooltipModalRouteName,
TextMessageTooltipModalRouteName,
ThreadSettingsMemberTooltipModalRouteName,
- RelationshipListItemTooltipModalRouteName,
+ UserRelationshipTooltipModalRouteName,
RobotextMessageTooltipModalRouteName,
VideoPlaybackModalRouteName,
];
diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js
--- a/native/profile/relationship-list-item.react.js
+++ b/native/profile/relationship-list-item.react.js
@@ -41,7 +41,7 @@
} from '../navigation/overlay-context.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import {
- RelationshipListItemTooltipModalRouteName,
+ UserRelationshipTooltipModalRouteName,
FriendListRouteName,
BlockListRouteName,
} from '../navigation/route-names.js';
@@ -218,8 +218,8 @@
};
editButton.current.measure((x, y, width, height, pageX, pageY) => {
const coordinates = { x: pageX, y: pageY, width, height };
- this.props.navigate<'RelationshipListItemTooltipModal'>({
- name: RelationshipListItemTooltipModalRouteName,
+ this.props.navigate<'UserRelationshipTooltipModal'>({
+ name: UserRelationshipTooltipModalRouteName,
params: {
presentedFrom: this.props.relationshipListRoute.key,
initialCoordinates: coordinates,
diff --git a/native/profile/relationship-list-item-tooltip-modal.react.js b/native/profile/user-relationship-tooltip-modal.react.js
rename from native/profile/relationship-list-item-tooltip-modal.react.js
rename to native/profile/user-relationship-tooltip-modal.react.js
--- a/native/profile/relationship-list-item-tooltip-modal.react.js
+++ b/native/profile/user-relationship-tooltip-modal.react.js
@@ -26,12 +26,12 @@
type Action = 'unfriend' | 'block' | 'unblock';
-export type RelationshipListItemTooltipModalParams = TooltipParams<{
+export type UserRelationshipTooltipModalParams = TooltipParams<{
+relativeUserInfo: RelativeUserInfo,
}>;
type OnRemoveUserProps = {
- ...RelationshipListItemTooltipModalParams,
+ ...UserRelationshipTooltipModalParams,
+action: Action,
};
function useRelationshipAction(input: OnRemoveUserProps) {
@@ -84,7 +84,7 @@
}
function TooltipMenu(
- props: TooltipMenuProps<'RelationshipListItemTooltipModal'>,
+ props: TooltipMenuProps<'UserRelationshipTooltipModal'>,
): React.Node {
const { route, tooltipItem: TooltipItem } = props;
@@ -123,10 +123,11 @@
}
type Props = {
- +navigation: AppNavigationProp<'RelationshipListItemTooltipModal'>,
+ +navigation: AppNavigationProp<'UserRelationshipTooltipModal'>,
...
};
-class RelationshipListItemTooltipButton extends React.PureComponent<Props> {
+
+class UserRelationshipTooltipButton extends React.PureComponent<Props> {
render() {
return (
<TouchableOpacity onPress={this.onPress}>
@@ -140,11 +141,11 @@
};
}
-const RelationshipListItemTooltipModal: React.ComponentType<
- BaseTooltipProps<'RelationshipListItemTooltipModal'>,
-> = createTooltip<'RelationshipListItemTooltipModal'>(
- RelationshipListItemTooltipButton,
+const UserRelationshipTooltipModal: React.ComponentType<
+ BaseTooltipProps<'UserRelationshipTooltipModal'>,
+> = createTooltip<'UserRelationshipTooltipModal'>(
+ UserRelationshipTooltipButton,
TooltipMenu,
);
-export default RelationshipListItemTooltipModal;
+export default UserRelationshipTooltipModal;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 2:00 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2569931
Default Alt Text
D9379.id31700.diff (6 KB)

Event Timeline