[Chat] NUX (#10848)

Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman
2026-06-10 22:35:35 +03:00
committed by GitHub
parent 2d896983ab
commit 2efdc3fe35
14 changed files with 404 additions and 60 deletions
+4 -2
View File
@@ -211,10 +211,12 @@ export function InitiateChatFlow({
title,
onSelectChat,
onSelectGroupChat,
startInGroupChat = false,
}: {
title: string
onSelectChat: (did: string) => void
onSelectGroupChat: (dids: string[], groupName: string) => void
startInGroupChat?: boolean
}) {
const t = useTheme()
const {t: l} = useLingui()
@@ -243,8 +245,8 @@ export function InitiateChatFlow({
},
dispatch,
] = useReducer(reducer, {
chatState: ChatState.NEW_CHAT,
screenTitle: title,
chatState: startInGroupChat ? ChatState.NEW_GROUP_CHAT : ChatState.NEW_CHAT,
screenTitle: startInGroupChat ? l`New group chat` : title,
groupChatDids: [],
groupChatProfiles: [],
groupName: '',
+10 -1
View File
@@ -23,9 +23,13 @@ import {useAnalytics} from '#/analytics'
export function NewChat({
control,
onNewChat,
startInGroupChat = false,
onClose,
}: {
control: Dialog.DialogControlProps
onNewChat: (chatId: string) => void
startInGroupChat?: boolean
onClose?: () => void
}) {
const t = useTheme()
const {t: l} = useLingui()
@@ -169,13 +173,18 @@ export function NewChat({
<Dialog.Outer
control={control}
testID="newChatDialog"
nativeOptions={{fullHeight: true}}>
nativeOptions={{fullHeight: true}}
onClose={onClose}>
<Dialog.Handle />
{isGroupChatEnabled ? (
<InitiateChatFlow
// remount when the entry mode changes so the flow re-seeds its
// initial step (the children stay mounted across open/close)
key={startInGroupChat ? 'group' : 'default'}
title={l`New chat`}
onSelectChat={onCreateChat}
onSelectGroupChat={onCreateGroupChat}
startInGroupChat={startInGroupChat}
/>
) : (
<SearchablePeopleList