From b31a91f924fe9c54178dd13b0e4a48ec32b4b4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Mon, 27 Apr 2026 13:42:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20member=20to=20group=20via=20UserS?= =?UTF-8?q?earch=20=E2=80=94=20pass=20addToGroupId=20param=20from=20GroupS?= =?UTF-8?q?ettings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/navigation/types.ts | 2 +- src/screens/contact/UserSearchScreen.tsx | 34 +++++++++++++++-------- src/screens/group/GroupSettingsScreen.tsx | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/navigation/types.ts b/src/navigation/types.ts index d091e45..6649692 100644 --- a/src/navigation/types.ts +++ b/src/navigation/types.ts @@ -14,7 +14,7 @@ export type RootStackParams = { Main: undefined SingleChat: { targetId: string; targetName: string; targetAvatar?: string } GroupChat: { groupId: string; groupName: string } - UserSearch: undefined + UserSearch: { addToGroupId?: string } | undefined GroupList: undefined CreateGroup: undefined GroupMembers: { groupId: string; groupName: string } diff --git a/src/screens/contact/UserSearchScreen.tsx b/src/screens/contact/UserSearchScreen.tsx index 0bb8ee9..aad1fac 100644 --- a/src/screens/contact/UserSearchScreen.tsx +++ b/src/screens/contact/UserSearchScreen.tsx @@ -3,17 +3,20 @@ import { View, Text, TextInput, FlatList, StyleSheet, TouchableOpacity, SafeAreaView, ActivityIndicator, Alert, Image, } from 'react-native' -import { useNavigation } from '@react-navigation/native' -import type { NativeStackNavigationProp } from '@react-navigation/native-stack' +import { useNavigation, useRoute } from '@react-navigation/native' +import type { NativeStackNavigationProp, NativeStackScreenProps } from '@react-navigation/native-stack' import { ImSDK } from '@xuqm/rn-sdk' import { demoApi, type UserProfile } from '../../api/demo' import { load, save, K } from '../../utils/storage' import type { RootStackParams } from '../../navigation/types' type Nav = NativeStackNavigationProp +type Props = NativeStackScreenProps export default function UserSearchScreen() { const navigation = useNavigation