fix up rebase errors
This commit is contained in:
+9
-11
@@ -69,6 +69,7 @@ import {SupportScreen} from '#/view/screens/Support'
|
|||||||
import {TermsOfServiceScreen} from '#/view/screens/TermsOfService'
|
import {TermsOfServiceScreen} from '#/view/screens/TermsOfService'
|
||||||
import {BottomBar} from '#/view/shell/bottom-bar/BottomBar'
|
import {BottomBar} from '#/view/shell/bottom-bar/BottomBar'
|
||||||
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
||||||
|
import {LeftNav} from '#/view/shell/desktop/LeftNav'
|
||||||
import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen'
|
import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen'
|
||||||
import HashtagScreen from '#/screens/Hashtag'
|
import HashtagScreen from '#/screens/Hashtag'
|
||||||
import {MessagesScreen} from '#/screens/Messages/ChatList'
|
import {MessagesScreen} from '#/screens/Messages/ChatList'
|
||||||
@@ -112,6 +113,7 @@ const MyProfileTab =
|
|||||||
createNativeStackNavigatorWithAuth<MyProfileTabNavigatorParams>()
|
createNativeStackNavigatorWithAuth<MyProfileTabNavigatorParams>()
|
||||||
const MessagesTab =
|
const MessagesTab =
|
||||||
createNativeStackNavigatorWithAuth<MessagesTabNavigatorParams>()
|
createNativeStackNavigatorWithAuth<MessagesTabNavigatorParams>()
|
||||||
|
const FeedsTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
||||||
const ListsTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
const ListsTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
||||||
const ModerationTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
const ModerationTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
||||||
const SettingsTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
const SettingsTab = createNativeStackNavigatorWithAuth<FlatNavigatorParams>()
|
||||||
@@ -377,11 +379,6 @@ function commonScreens(
|
|||||||
getComponent={() => NotificationSettingsScreen}
|
getComponent={() => NotificationSettingsScreen}
|
||||||
options={{title: title(msg`Notification settings`), requireAuth: true}}
|
options={{title: title(msg`Notification settings`), requireAuth: true}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
|
||||||
name="Feeds"
|
|
||||||
getComponent={() => FeedsScreen}
|
|
||||||
options={{title: title(msg`Feeds`)}}
|
|
||||||
/>
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="StarterPack"
|
name="StarterPack"
|
||||||
getComponent={() => StarterPackScreen}
|
getComponent={() => StarterPackScreen}
|
||||||
@@ -409,6 +406,11 @@ function commonScreens(
|
|||||||
getComponent={() => ModerationScreen}
|
getComponent={() => ModerationScreen}
|
||||||
options={{title: title(msg`Moderation`), requireAuth: true}}
|
options={{title: title(msg`Moderation`), requireAuth: true}}
|
||||||
/>
|
/>
|
||||||
|
<Stack.Screen
|
||||||
|
name="Feeds"
|
||||||
|
getComponent={() => FeedsScreen}
|
||||||
|
options={{title: title(msg`Feeds`)}}
|
||||||
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="Lists"
|
name="Lists"
|
||||||
component={ListsScreen}
|
component={ListsScreen}
|
||||||
@@ -453,8 +455,8 @@ function TabsNavigatorMobile() {
|
|||||||
getComponent={() => SearchTabNavigator}
|
getComponent={() => SearchTabNavigator}
|
||||||
/>
|
/>
|
||||||
<MobileTab.Screen
|
<MobileTab.Screen
|
||||||
name="FeedsTab"
|
name="MessagesTab"
|
||||||
getComponent={() => FeedsTabNavigator}
|
getComponent={() => MessagesTabNavigator}
|
||||||
/>
|
/>
|
||||||
<MobileTab.Screen
|
<MobileTab.Screen
|
||||||
name="NotificationsTab"
|
name="NotificationsTab"
|
||||||
@@ -464,10 +466,6 @@ function TabsNavigatorMobile() {
|
|||||||
name="MyProfileTab"
|
name="MyProfileTab"
|
||||||
getComponent={() => MyProfileTabNavigator}
|
getComponent={() => MyProfileTabNavigator}
|
||||||
/>
|
/>
|
||||||
<MobileTab.Screen
|
|
||||||
name="MessagesTab"
|
|
||||||
getComponent={() => MessagesTabNavigator}
|
|
||||||
/>
|
|
||||||
</MobileTab.Navigator>
|
</MobileTab.Navigator>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ export function SearchablePeopleList({
|
|||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[, web([a.pt_xs])]}>
|
<View style={[web([a.pt_xs])]}>
|
||||||
<SearchInput
|
<SearchInput
|
||||||
inputRef={inputRef}
|
inputRef={inputRef}
|
||||||
value={searchText}
|
value={searchText}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export const router = new Router({
|
|||||||
ModerationMutedAccounts: '/moderation/muted-accounts',
|
ModerationMutedAccounts: '/moderation/muted-accounts',
|
||||||
ModerationBlockedAccounts: '/moderation/blocked-accounts',
|
ModerationBlockedAccounts: '/moderation/blocked-accounts',
|
||||||
// profiles, threads, lists
|
// profiles, threads, lists
|
||||||
|
MyProfile: '/my-profile',
|
||||||
Profile: ['/profile/:name', '/profile/:name/rss'],
|
Profile: ['/profile/:name', '/profile/:name/rss'],
|
||||||
ProfileFollowers: '/profile/:name/followers',
|
ProfileFollowers: '/profile/:name/followers',
|
||||||
ProfileFollows: '/profile/:name/follows',
|
ProfileFollows: '/profile/:name/follows',
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {StyleSheet, TouchableOpacity, View} from 'react-native'
|
import {StyleSheet, TouchableOpacity, View} from 'react-native'
|
||||||
import Animated from 'react-native-reanimated'
|
import Animated from 'react-native-reanimated'
|
||||||
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import {useMediaQuery} from 'react-responsive'
|
import {useMediaQuery} from 'react-responsive'
|
||||||
|
|
||||||
import {HITSLOP_20} from '#/lib/constants'
|
import {HITSLOP_20} from '#/lib/constants'
|
||||||
import {useMinimalShellFabTransform} from '#/lib/hooks/useMinimalShellTransform'
|
import {useMinimalShellFabTransform} from '#/lib/hooks/useMinimalShellTransform'
|
||||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||||
|
import {clamp} from '#/lib/numbers'
|
||||||
import {colors} from '#/lib/styles'
|
import {colors} from '#/lib/styles'
|
||||||
import {isNativeTablet} from '#/platform/detection'
|
import {isNativeTablet, isWeb} from '#/platform/detection'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {useTheme} from '#/alf'
|
import {useTheme} from '#/alf'
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ export function LoadLatestBtn({
|
|||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const {isDesktop, isTablet, isMobile, isTabletOrMobile} = useWebMediaQueries()
|
const {isDesktop, isTablet, isMobile, isTabletOrMobile} = useWebMediaQueries()
|
||||||
const fabMinimalShellTransform = useMinimalShellFabTransform()
|
const fabMinimalShellTransform = useMinimalShellFabTransform()
|
||||||
|
const insets = useSafeAreaInsets()
|
||||||
|
|
||||||
// move button inline if it starts overlapping the left nav
|
// move button inline if it starts overlapping the left nav
|
||||||
const isTallViewport = useMediaQuery({minHeight: 700})
|
const isTallViewport = useMediaQuery({minHeight: 700})
|
||||||
@@ -36,6 +39,10 @@ export function LoadLatestBtn({
|
|||||||
// it on both tablet and mobile since we are showing the bottom bar (see createNativeStackNavigatorWithAuth)
|
// it on both tablet and mobile since we are showing the bottom bar (see createNativeStackNavigatorWithAuth)
|
||||||
const showBottomBar = hasSession ? isMobile : isTabletOrMobile
|
const showBottomBar = hasSession ? isMobile : isTabletOrMobile
|
||||||
|
|
||||||
|
const bottomPosition = isTablet
|
||||||
|
? {bottom: 50}
|
||||||
|
: {bottom: clamp(insets.bottom, 15, 60) + 15}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedTouchableOpacity
|
<AnimatedTouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
@@ -47,6 +54,7 @@ export function LoadLatestBtn({
|
|||||||
isTablet && !isNativeTablet && styles.loadLatestInline,
|
isTablet && !isNativeTablet && styles.loadLatestInline,
|
||||||
t.atoms.border_contrast_high,
|
t.atoms.border_contrast_high,
|
||||||
t.atoms.bg,
|
t.atoms.bg,
|
||||||
|
bottomPosition,
|
||||||
showBottomBar && fabMinimalShellTransform,
|
showBottomBar && fabMinimalShellTransform,
|
||||||
]}
|
]}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {getCurrentRoute, isStateAtTabRoot, isTab} from '#/lib/routes/helpers'
|
|||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {CommonNavigatorParams, NavigationProp} from '#/lib/routes/types'
|
import {CommonNavigatorParams, NavigationProp} from '#/lib/routes/types'
|
||||||
import {isInvalidHandle} from '#/lib/strings/handles'
|
import {isInvalidHandle} from '#/lib/strings/handles'
|
||||||
|
import {isWeb} from '#/platform/detection'
|
||||||
import {emitSoftReset} from '#/state/events'
|
import {emitSoftReset} from '#/state/events'
|
||||||
import {useFetchHandle} from '#/state/queries/handle'
|
import {useFetchHandle} from '#/state/queries/handle'
|
||||||
import {useUnreadMessageCount} from '#/state/queries/messages/list-converations'
|
import {useUnreadMessageCount} from '#/state/queries/messages/list-converations'
|
||||||
@@ -475,7 +476,13 @@ export function LeftNav() {
|
|||||||
label={_(msg`Lists`)}
|
label={_(msg`Lists`)}
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
href={currentAccount ? makeProfileLink(currentAccount) : '/'}
|
href={
|
||||||
|
isWeb
|
||||||
|
? currentAccount
|
||||||
|
? makeProfileLink(currentAccount)
|
||||||
|
: '/'
|
||||||
|
: '/my-profile'
|
||||||
|
}
|
||||||
icon={
|
icon={
|
||||||
<UserCircle
|
<UserCircle
|
||||||
aria-hidden={true}
|
aria-hidden={true}
|
||||||
|
|||||||
Reference in New Issue
Block a user