rename sync to find
FCF (Find Contacts Flow)
This commit is contained in:
+8
-8
@@ -75,6 +75,7 @@ import {BottomBar} from '#/view/shell/bottom-bar/BottomBar'
|
||||
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
||||
import {BookmarksScreen} from '#/screens/Bookmarks'
|
||||
import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen'
|
||||
import {FindContactsFlowScreen} from '#/screens/FindContactsFlowScreen'
|
||||
import HashtagScreen from '#/screens/Hashtag'
|
||||
import {LogScreen} from '#/screens/Log'
|
||||
import {MessagesScreen} from '#/screens/Messages/ChatList'
|
||||
@@ -106,6 +107,7 @@ import {AppIconSettingsScreen} from '#/screens/Settings/AppIconSettings'
|
||||
import {AppPasswordsScreen} from '#/screens/Settings/AppPasswords'
|
||||
import {ContentAndMediaSettingsScreen} from '#/screens/Settings/ContentAndMediaSettings'
|
||||
import {ExternalMediaPreferencesScreen} from '#/screens/Settings/ExternalMediaPreferences'
|
||||
import {FindContactsSettingsScreen} from '#/screens/Settings/FindContactsSettings'
|
||||
import {FollowingFeedPreferencesScreen} from '#/screens/Settings/FollowingFeedPreferences'
|
||||
import {InterestsSettingsScreen} from '#/screens/Settings/InterestsSettings'
|
||||
import {LanguageSettingsScreen} from '#/screens/Settings/LanguageSettings'
|
||||
@@ -123,14 +125,12 @@ import {RepostNotificationSettingsScreen} from '#/screens/Settings/NotificationS
|
||||
import {RepostsOnRepostsNotificationSettingsScreen} from '#/screens/Settings/NotificationSettings/RepostsOnRepostsNotificationSettings'
|
||||
import {PrivacyAndSecuritySettingsScreen} from '#/screens/Settings/PrivacyAndSecuritySettings'
|
||||
import {SettingsScreen} from '#/screens/Settings/Settings'
|
||||
import {SyncContactsSettingsScreen} from '#/screens/Settings/SyncContactsSettings'
|
||||
import {ThreadPreferencesScreen} from '#/screens/Settings/ThreadPreferences'
|
||||
import {
|
||||
StarterPackScreen,
|
||||
StarterPackScreenShort,
|
||||
} from '#/screens/StarterPack/StarterPackScreen'
|
||||
import {Wizard} from '#/screens/StarterPack/Wizard'
|
||||
import {SyncContactsFlowScreen} from '#/screens/SyncContactsFlowScreen'
|
||||
import TopicScreen from '#/screens/Topic'
|
||||
import {VideoFeed} from '#/screens/VideoFeed'
|
||||
import {type Theme, useTheme} from '#/alf'
|
||||
@@ -419,10 +419,10 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="SyncContactsSettings"
|
||||
getComponent={() => SyncContactsSettingsScreen}
|
||||
name="FindContactsSettings"
|
||||
getComponent={() => FindContactsSettingsScreen}
|
||||
options={{
|
||||
title: title(msg`Sync contacts`),
|
||||
title: title(msg`Find contacts`),
|
||||
requireAuth: true,
|
||||
}}
|
||||
/>
|
||||
@@ -620,10 +620,10 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="SyncContactsFlow"
|
||||
getComponent={() => SyncContactsFlowScreen}
|
||||
name="FindContactsFlow"
|
||||
getComponent={() => FindContactsFlowScreen}
|
||||
options={{
|
||||
title: title(msg`Sync Contacts`),
|
||||
title: title(msg`Find Contacts`),
|
||||
requireAuth: true,
|
||||
gestureEnabled: false,
|
||||
}}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {VerifyNumber} from './screens/VerifyNumber'
|
||||
import {ViewMatches} from './screens/ViewMatches'
|
||||
import {type Action, type State} from './state'
|
||||
|
||||
export function SyncContactsFlow({
|
||||
export function FindContactsFlow({
|
||||
state,
|
||||
dispatch,
|
||||
onCancel,
|
||||
@@ -0,0 +1,3 @@
|
||||
export function FindContactsFlow() {
|
||||
throw new Error('FindContactsFlow is not available on web')
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export function SyncContactsFlow() {
|
||||
throw new Error('SyncContactsFlow is not available on web')
|
||||
}
|
||||
@@ -363,7 +363,7 @@ function MatchItem({
|
||||
<ProfileCard.FollowButton
|
||||
profile={profile}
|
||||
moderationOpts={moderationOpts}
|
||||
logContext="SyncContacts"
|
||||
logContext="FindContacts"
|
||||
/>
|
||||
{!shadow.viewer?.following && (
|
||||
<Button
|
||||
|
||||
@@ -171,7 +171,7 @@ function assertCurrentStep<S extends State['step']>(
|
||||
}
|
||||
}
|
||||
|
||||
export function useSyncContactsFlowState(
|
||||
export function useFindContactsFlowState(
|
||||
initialState: State = {step: '1: phone input'},
|
||||
) {
|
||||
return useReducer(reducer, initialState)
|
||||
|
||||
@@ -67,7 +67,7 @@ export type CommonNavigatorParams = {
|
||||
InterestsSettings: undefined
|
||||
AboutSettings: undefined
|
||||
AppIconSettings: undefined
|
||||
SyncContactsSettings: undefined
|
||||
FindContactsSettings: undefined
|
||||
Search: {q?: string; tab?: 'user' | 'profile' | 'feed'}
|
||||
Hashtag: {tag: string; author?: string}
|
||||
Topic: {topic: string}
|
||||
@@ -88,7 +88,7 @@ export type CommonNavigatorParams = {
|
||||
StarterPackEdit: {rkey?: string}
|
||||
VideoFeed: VideoFeedSourceContext
|
||||
Bookmarks: undefined
|
||||
SyncContactsFlow: undefined
|
||||
FindContactsFlow: undefined
|
||||
}
|
||||
|
||||
export type BottomTabNavigatorParams = CommonNavigatorParams & {
|
||||
|
||||
@@ -309,7 +309,7 @@ export type MetricEvents = {
|
||||
| 'ImmersiveVideo'
|
||||
| 'ExploreSuggestedAccounts'
|
||||
| 'OnboardingSuggestedAccounts'
|
||||
| 'SyncContacts'
|
||||
| 'FindContacts'
|
||||
}
|
||||
'profile:followers:view': {
|
||||
contextProfileDid: string
|
||||
@@ -397,7 +397,7 @@ export type MetricEvents = {
|
||||
| 'ImmersiveVideo'
|
||||
| 'ExploreSuggestedAccounts'
|
||||
| 'OnboardingSuggestedAccounts'
|
||||
| 'SyncContacts'
|
||||
| 'FindContacts'
|
||||
}
|
||||
'chat:create': {
|
||||
logContext: 'ProfileHeader' | 'NewChatDialog' | 'SendViaChatDialog'
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ export const router = new Router<AllNavigatableRoutes>({
|
||||
'/settings/notifications/reposts-on-reposts',
|
||||
ActivityNotificationSettings: '/settings/notifications/activity',
|
||||
MiscellaneousNotificationSettings: '/settings/notifications/miscellaneous',
|
||||
SyncContactsSettings: '/settings/sync-contacts',
|
||||
FindContactsSettings: '/settings/find-contacts',
|
||||
// support
|
||||
Support: '/support',
|
||||
PrivacyPolicy: '/support/privacy',
|
||||
@@ -92,5 +92,5 @@ export const router = new Router<AllNavigatableRoutes>({
|
||||
StarterPackWizard: '/starter-pack/create',
|
||||
VideoFeed: '/video-feed',
|
||||
Bookmarks: '/saved',
|
||||
SyncContactsFlow: '/sync-contacts',
|
||||
FindContactsFlow: '/find-contacts',
|
||||
})
|
||||
|
||||
@@ -12,16 +12,16 @@ import {
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
||||
import {useSyncContactsFlowState} from '#/components/contacts/state'
|
||||
import {SyncContactsFlow} from '#/components/contacts/SyncContactsFlow'
|
||||
import {FindContactsFlow} from '#/components/contacts/FindContactsFlow'
|
||||
import {useFindContactsFlowState} from '#/components/contacts/state'
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {ScreenTransition} from '#/components/ScreenTransition'
|
||||
|
||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'SyncContactsFlow'>
|
||||
export function SyncContactsFlowScreen({navigation}: Props) {
|
||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'FindContactsFlow'>
|
||||
export function FindContactsFlowScreen({navigation}: Props) {
|
||||
const {_} = useLingui()
|
||||
|
||||
const [state, dispatch] = useSyncContactsFlowState()
|
||||
const [state, dispatch] = useFindContactsFlowState()
|
||||
|
||||
const [transitionDirection, setTransitionDirection] = useState<
|
||||
'Forward' | 'Backward'
|
||||
@@ -51,13 +51,13 @@ export function SyncContactsFlowScreen({navigation}: Props) {
|
||||
{isNative ? (
|
||||
<LayoutAnimationConfig skipEntering skipExiting>
|
||||
<ScreenTransition key={state.step} direction={transitionDirection}>
|
||||
<SyncContactsFlow
|
||||
<FindContactsFlow
|
||||
state={state}
|
||||
dispatch={dispatch}
|
||||
onCancel={() =>
|
||||
navigation.canGoBack()
|
||||
? navigation.goBack()
|
||||
: navigation.navigate('SyncContactsFlow', undefined, {
|
||||
: navigation.navigate('FindContactsFlow', undefined, {
|
||||
pop: true,
|
||||
})
|
||||
}
|
||||
+7
-7
@@ -11,14 +11,14 @@ import {isNative} from '#/platform/detection'
|
||||
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {ButtonText} from '#/components/Button'
|
||||
import {Contacts_Stroke2_Corner2_Rounded as SyncContactsIcon} from '#/components/icons/Contacts'
|
||||
import {Contacts_Stroke2_Corner2_Rounded as FindContactsIcon} from '#/components/icons/Contacts'
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {InlineLinkText, Link} from '#/components/Link'
|
||||
import {Text} from '#/components/Typography'
|
||||
import * as SettingsList from './components/SettingsList'
|
||||
|
||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'SyncContactsSettings'>
|
||||
export function SyncContactsSettingsScreen({}: Props) {
|
||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'FindContactsSettings'>
|
||||
export function FindContactsSettingsScreen({}: Props) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
|
||||
@@ -33,7 +33,7 @@ export function SyncContactsSettingsScreen({}: Props) {
|
||||
<Layout.Header.BackButton />
|
||||
<Layout.Header.Content>
|
||||
<Layout.Header.TitleText>
|
||||
<Trans>Sync contacts</Trans>
|
||||
<Trans>Find contacts</Trans>
|
||||
</Layout.Header.TitleText>
|
||||
</Layout.Header.Content>
|
||||
<Layout.Header.Slot />
|
||||
@@ -42,9 +42,9 @@ export function SyncContactsSettingsScreen({}: Props) {
|
||||
<Layout.Content>
|
||||
<SettingsList.Container>
|
||||
<SettingsList.Item>
|
||||
<SettingsList.ItemIcon icon={SyncContactsIcon} />
|
||||
<SettingsList.ItemIcon icon={FindContactsIcon} />
|
||||
<SettingsList.ItemText>
|
||||
<Trans>Sync Contacts</Trans>
|
||||
<Trans>Find Contacts</Trans>
|
||||
</SettingsList.ItemText>
|
||||
</SettingsList.Item>
|
||||
<SettingsList.Item style={[a.pt_0]}>
|
||||
@@ -69,7 +69,7 @@ export function SyncContactsSettingsScreen({}: Props) {
|
||||
{isAvailable && (
|
||||
<SettingsList.Item>
|
||||
<Link
|
||||
to={{screen: 'SyncContactsFlow'}}
|
||||
to={{screen: 'FindContactsFlow'}}
|
||||
label={_(msg`Upload contacts`)}
|
||||
size="large"
|
||||
color="primary"
|
||||
@@ -210,11 +210,11 @@ export function SettingsScreen({}: Props) {
|
||||
</SettingsList.LinkItem>
|
||||
{isNative && (
|
||||
<SettingsList.LinkItem
|
||||
to="/settings/sync-contacts"
|
||||
label={_(msg`Sync contacts`)}>
|
||||
to="/settings/find-contacts"
|
||||
label={_(msg`Find contacts`)}>
|
||||
<SettingsList.ItemIcon icon={ContactsIcon} />
|
||||
<SettingsList.ItemText>
|
||||
<Trans>Sync contacts</Trans>
|
||||
<Trans>Find contacts</Trans>
|
||||
</SettingsList.ItemText>
|
||||
</SettingsList.LinkItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user