fix patch cmd
This commit is contained in:
643
ios/patching/016-social-app-ios-consolidated-fixes.patch
Normal file
643
ios/patching/016-social-app-ios-consolidated-fixes.patch
Normal file
@@ -0,0 +1,643 @@
|
|||||||
|
diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx
|
||||||
|
index 6b8257b91..8bf4887f4 100644
|
||||||
|
--- a/src/screens/Settings/AboutSettings.tsx
|
||||||
|
+++ b/src/screens/Settings/AboutSettings.tsx
|
||||||
|
@@ -1,40 +1,40 @@
|
||||||
|
-import {useMemo} from 'react'
|
||||||
|
-import {Platform} from 'react-native'
|
||||||
|
-import {setStringAsync} from 'expo-clipboard'
|
||||||
|
+import { useMemo } from 'react'
|
||||||
|
+import { Platform } from 'react-native'
|
||||||
|
+import { setStringAsync } from 'expo-clipboard'
|
||||||
|
import * as FileSystem from 'expo-file-system/legacy'
|
||||||
|
-import {Image} from 'expo-image'
|
||||||
|
-import {msg, Trans} from '@lingui/macro'
|
||||||
|
-import {useLingui} from '@lingui/react'
|
||||||
|
-import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
|
-import {useMutation} from '@tanstack/react-query'
|
||||||
|
-import {Statsig} from 'statsig-react-native-expo'
|
||||||
|
+import { Image } from 'expo-image'
|
||||||
|
+import { msg, Trans } from '@lingui/macro'
|
||||||
|
+import { useLingui } from '@lingui/react'
|
||||||
|
+import { type NativeStackScreenProps } from '@react-navigation/native-stack'
|
||||||
|
+import { useMutation } from '@tanstack/react-query'
|
||||||
|
+import { Statsig } from 'statsig-react-native-expo'
|
||||||
|
|
||||||
|
-import {STATUS_PAGE_URL} from '#/lib/constants'
|
||||||
|
-import {type CommonNavigatorParams} from '#/lib/routes/types'
|
||||||
|
-import {isAndroid, isIOS, isNative} from '#/platform/detection'
|
||||||
|
+import { STATUS_PAGE_URL } from '#/lib/constants'
|
||||||
|
+import { type CommonNavigatorParams } from '#/lib/routes/types'
|
||||||
|
+import { isAndroid, isIOS, isNative } from '#/platform/detection'
|
||||||
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
|
import * as SettingsList from '#/screens/Settings/components/SettingsList'
|
||||||
|
-import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom'
|
||||||
|
-import {BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon} from '#/components/icons/BroomSparkle'
|
||||||
|
-import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines'
|
||||||
|
-import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe'
|
||||||
|
-import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper'
|
||||||
|
-import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
|
||||||
|
+import { Atom_Stroke2_Corner0_Rounded as AtomIcon } from '#/components/icons/Atom'
|
||||||
|
+import { BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon } from '#/components/icons/BroomSparkle'
|
||||||
|
+import { CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon } from '#/components/icons/CodeLines'
|
||||||
|
+import { Globe_Stroke2_Corner0_Rounded as GlobeIcon } from '#/components/icons/Globe'
|
||||||
|
+import { Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon } from '#/components/icons/Newspaper'
|
||||||
|
+import { Wrench_Stroke2_Corner2_Rounded as WrenchIcon } from '#/components/icons/Wrench'
|
||||||
|
import * as Layout from '#/components/Layout'
|
||||||
|
-import {Loader} from '#/components/Loader'
|
||||||
|
+import { Loader } from '#/components/Loader'
|
||||||
|
import * as env from '#/env'
|
||||||
|
-import {useDemoMode} from '#/storage/hooks/demo-mode'
|
||||||
|
-import {useDevMode} from '#/storage/hooks/dev-mode'
|
||||||
|
-import {OTAInfo} from './components/OTAInfo'
|
||||||
|
+import { useDemoMode } from '#/storage/hooks/demo-mode'
|
||||||
|
+import { useDevMode } from '#/storage/hooks/dev-mode'
|
||||||
|
+import { OTAInfo } from './components/OTAInfo'
|
||||||
|
|
||||||
|
type Props = NativeStackScreenProps<CommonNavigatorParams, 'AboutSettings'>
|
||||||
|
-export function AboutSettingsScreen({}: Props) {
|
||||||
|
- const {_, i18n} = useLingui()
|
||||||
|
+export function AboutSettingsScreen({ }: Props) {
|
||||||
|
+ const { _, i18n } = useLingui()
|
||||||
|
const [devModeEnabled, setDevModeEnabled] = useDevMode()
|
||||||
|
const [demoModeEnabled, setDemoModeEnabled] = useDemoMode()
|
||||||
|
const stableID = useMemo(() => Statsig.getStableID(), [])
|
||||||
|
|
||||||
|
- const {mutate: onClearImageCache, isPending: isClearingImageCache} =
|
||||||
|
+ const { mutate: onClearImageCache, isPending: isClearingImageCache } =
|
||||||
|
useMutation({
|
||||||
|
mutationFn: async () => {
|
||||||
|
const freeSpaceBefore = await FileSystem.getFreeDiskStorageAsync()
|
||||||
|
@@ -80,7 +80,7 @@ export function AboutSettingsScreen({}: Props) {
|
||||||
|
<Layout.Content>
|
||||||
|
<SettingsList.Container>
|
||||||
|
<SettingsList.LinkItem
|
||||||
|
- to="https://bsky.social/about/support/tos"
|
||||||
|
+ to="https://syu.is/about/support/tos"
|
||||||
|
label={_(msg`Terms of Service`)}>
|
||||||
|
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
||||||
|
<SettingsList.ItemText>
|
||||||
|
@@ -88,7 +88,7 @@ export function AboutSettingsScreen({}: Props) {
|
||||||
|
</SettingsList.ItemText>
|
||||||
|
</SettingsList.LinkItem>
|
||||||
|
<SettingsList.LinkItem
|
||||||
|
- to="https://bsky.social/about/support/privacy-policy"
|
||||||
|
+ to="https://syu.is/about/support/privacy-policy"
|
||||||
|
label={_(msg`Privacy Policy`)}>
|
||||||
|
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
||||||
|
<SettingsList.ItemText>
|
||||||
|
@@ -131,17 +131,17 @@ export function AboutSettingsScreen({}: Props) {
|
||||||
|
Toast.show(
|
||||||
|
newDevModeEnabled
|
||||||
|
? _(
|
||||||
|
- msg({
|
||||||
|
- message: 'Developer mode enabled',
|
||||||
|
- context: 'toast',
|
||||||
|
- }),
|
||||||
|
- )
|
||||||
|
+ msg({
|
||||||
|
+ message: 'Developer mode enabled',
|
||||||
|
+ context: 'toast',
|
||||||
|
+ }),
|
||||||
|
+ )
|
||||||
|
: _(
|
||||||
|
- msg({
|
||||||
|
- message: 'Developer mode disabled',
|
||||||
|
- context: 'toast',
|
||||||
|
- }),
|
||||||
|
- ),
|
||||||
|
+ msg({
|
||||||
|
+ message: 'Developer mode disabled',
|
||||||
|
+ context: 'toast',
|
||||||
|
+ }),
|
||||||
|
+ ),
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
@@ -166,7 +166,7 @@ export function AboutSettingsScreen({}: Props) {
|
||||||
|
setDemoModeEnabled(newDemoModeEnabled)
|
||||||
|
Toast.show(
|
||||||
|
'Demo mode ' +
|
||||||
|
- (newDemoModeEnabled ? 'enabled' : 'disabled'),
|
||||||
|
+ (newDemoModeEnabled ? 'enabled' : 'disabled'),
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
label={
|
||||||
|
diff --git a/src/screens/Takendown.tsx b/src/screens/Takendown.tsx
|
||||||
|
index dd319a4c6..2dcfb80dd 100644
|
||||||
|
--- a/src/screens/Takendown.tsx
|
||||||
|
+++ b/src/screens/Takendown.tsx
|
||||||
|
@@ -1,40 +1,40 @@
|
||||||
|
-import {useMemo, useState} from 'react'
|
||||||
|
-import {Modal, View} from 'react-native'
|
||||||
|
-import {SystemBars} from 'react-native-edge-to-edge'
|
||||||
|
-import {KeyboardAwareScrollView} from 'react-native-keyboard-controller'
|
||||||
|
-import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
|
-import {type ComAtprotoAdminDefs, ToolsOzoneReportDefs} from '@atproto/api'
|
||||||
|
-import {msg, Trans} from '@lingui/macro'
|
||||||
|
-import {useLingui} from '@lingui/react'
|
||||||
|
-import {useMutation} from '@tanstack/react-query'
|
||||||
|
+import { useMemo, useState } from 'react'
|
||||||
|
+import { Modal, View } from 'react-native'
|
||||||
|
+import { SystemBars } from 'react-native-edge-to-edge'
|
||||||
|
+import { KeyboardAwareScrollView } from 'react-native-keyboard-controller'
|
||||||
|
+import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||||
|
+import { type ComAtprotoAdminDefs, ToolsOzoneReportDefs } from '@atproto/api'
|
||||||
|
+import { msg, Trans } from '@lingui/macro'
|
||||||
|
+import { useLingui } from '@lingui/react'
|
||||||
|
+import { useMutation } from '@tanstack/react-query'
|
||||||
|
import Graphemer from 'graphemer'
|
||||||
|
|
||||||
|
import {
|
||||||
|
BLUESKY_MOD_SERVICE_HEADERS,
|
||||||
|
MAX_REPORT_REASON_GRAPHEME_LENGTH,
|
||||||
|
} from '#/lib/constants'
|
||||||
|
-import {useEnableKeyboardController} from '#/lib/hooks/useEnableKeyboardController'
|
||||||
|
-import {cleanError} from '#/lib/strings/errors'
|
||||||
|
-import {isIOS, isWeb} from '#/platform/detection'
|
||||||
|
-import {useAgent, useSession, useSessionApi} from '#/state/session'
|
||||||
|
-import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
|
||||||
|
-import {Logo} from '#/view/icons/Logo'
|
||||||
|
-import {atoms as a, native, useBreakpoints, useTheme, web} from '#/alf'
|
||||||
|
-import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
|
+import { useEnableKeyboardController } from '#/lib/hooks/useEnableKeyboardController'
|
||||||
|
+import { cleanError } from '#/lib/strings/errors'
|
||||||
|
+import { isIOS, isWeb } from '#/platform/detection'
|
||||||
|
+import { useAgent, useSession, useSessionApi } from '#/state/session'
|
||||||
|
+import { CharProgress } from '#/view/com/composer/char-progress/CharProgress'
|
||||||
|
+import { Logo } from '#/view/icons/Logo'
|
||||||
|
+import { atoms as a, native, useBreakpoints, useTheme, web } from '#/alf'
|
||||||
|
+import { Button, ButtonIcon, ButtonText } from '#/components/Button'
|
||||||
|
import * as TextField from '#/components/forms/TextField'
|
||||||
|
-import {InlineLinkText} from '#/components/Link'
|
||||||
|
-import {Loader} from '#/components/Loader'
|
||||||
|
-import {P, Text} from '#/components/Typography'
|
||||||
|
+import { InlineLinkText } from '#/components/Link'
|
||||||
|
+import { Loader } from '#/components/Loader'
|
||||||
|
+import { P, Text } from '#/components/Typography'
|
||||||
|
|
||||||
|
const COL_WIDTH = 400
|
||||||
|
|
||||||
|
export function Takendown() {
|
||||||
|
- const {_} = useLingui()
|
||||||
|
+ const { _ } = useLingui()
|
||||||
|
const t = useTheme()
|
||||||
|
const insets = useSafeAreaInsets()
|
||||||
|
- const {gtMobile} = useBreakpoints()
|
||||||
|
- const {currentAccount} = useSession()
|
||||||
|
- const {logoutCurrentAccount} = useSessionApi()
|
||||||
|
+ const { gtMobile } = useBreakpoints()
|
||||||
|
+ const { currentAccount } = useSession()
|
||||||
|
+ const { logoutCurrentAccount } = useSessionApi()
|
||||||
|
const agent = useAgent()
|
||||||
|
const [isAppealling, setIsAppealling] = useState(false)
|
||||||
|
const [reason, setReason] = useState('')
|
||||||
|
@@ -135,7 +135,7 @@ export function Takendown() {
|
||||||
|
animationType={native('slide')}
|
||||||
|
presentationStyle="formSheet"
|
||||||
|
style={[web(a.util_screen_outer)]}>
|
||||||
|
- {isIOS && <SystemBars style={{statusBar: 'light'}} />}
|
||||||
|
+ {isIOS && <SystemBars style={{ statusBar: 'light' }} />}
|
||||||
|
<KeyboardAwareScrollView style={[a.flex_1, t.atoms.bg]} centerContent>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
@@ -143,7 +143,7 @@ export function Takendown() {
|
||||||
|
a.justify_center,
|
||||||
|
gtMobile ? a.pt_4xl : [a.px_xl, a.pt_4xl],
|
||||||
|
]}>
|
||||||
|
- <View style={[a.flex_1, {maxWidth: COL_WIDTH, minHeight: COL_WIDTH}]}>
|
||||||
|
+ <View style={[a.flex_1, { maxWidth: COL_WIDTH, minHeight: COL_WIDTH }]}>
|
||||||
|
<View style={[a.pb_xl]}>
|
||||||
|
<Logo width={64} />
|
||||||
|
</View>
|
||||||
|
@@ -173,7 +173,7 @@ export function Takendown() {
|
||||||
|
<TextField.Root
|
||||||
|
isInvalid={
|
||||||
|
reasonGraphemeLength >
|
||||||
|
- MAX_REPORT_REASON_GRAPHEME_LENGTH || !!error
|
||||||
|
+ MAX_REPORT_REASON_GRAPHEME_LENGTH || !!error
|
||||||
|
}>
|
||||||
|
<TextField.Input
|
||||||
|
label={_(msg`Reason for appeal`)}
|
||||||
|
@@ -183,7 +183,7 @@ export function Takendown() {
|
||||||
|
multiline
|
||||||
|
numberOfLines={5}
|
||||||
|
autoFocus
|
||||||
|
- style={{paddingBottom: 40, minHeight: 150}}
|
||||||
|
+ style={{ paddingBottom: 40, minHeight: 150 }}
|
||||||
|
maxLength={MAX_REPORT_REASON_GRAPHEME_LENGTH * 10}
|
||||||
|
/>
|
||||||
|
</TextField.Root>
|
||||||
|
@@ -211,7 +211,7 @@ export function Takendown() {
|
||||||
|
style={[
|
||||||
|
a.text_md,
|
||||||
|
a.leading_normal,
|
||||||
|
- {color: t.palette.negative_500},
|
||||||
|
+ { color: t.palette.negative_500 },
|
||||||
|
a.mt_lg,
|
||||||
|
]}>
|
||||||
|
{cleanError(error)}
|
||||||
|
@@ -223,11 +223,11 @@ export function Takendown() {
|
||||||
|
<Trans>
|
||||||
|
Your account was found to be in violation of the{' '}
|
||||||
|
<InlineLinkText
|
||||||
|
- label={_(msg`Bluesky Social Terms of Service`)}
|
||||||
|
- to="https://bsky.social/about/support/tos"
|
||||||
|
+ label={_(msg`syu.is Terms of Service`)}
|
||||||
|
+ to="https://syu.is/about/support/tos"
|
||||||
|
style={[a.text_md, a.leading_normal]}
|
||||||
|
overridePresentation>
|
||||||
|
- Bluesky Social Terms of Service
|
||||||
|
+ syu.is Terms of Service
|
||||||
|
</InlineLinkText>
|
||||||
|
. You have been sent an email outlining the specific violation
|
||||||
|
and suspension period, if applicable. You can appeal this
|
||||||
|
@@ -243,7 +243,7 @@ export function Takendown() {
|
||||||
|
a.flex_row,
|
||||||
|
a.justify_between,
|
||||||
|
a.pt_5xl,
|
||||||
|
- {paddingBottom: 200},
|
||||||
|
+ { paddingBottom: 200 },
|
||||||
|
]}>
|
||||||
|
{secondaryBtn}
|
||||||
|
{primaryBtn}
|
||||||
|
@@ -259,9 +259,9 @@ export function Takendown() {
|
||||||
|
a.align_center,
|
||||||
|
t.atoms.bg,
|
||||||
|
gtMobile ? a.px_5xl : a.px_xl,
|
||||||
|
- {paddingBottom: Math.max(insets.bottom, a.pb_5xl.paddingBottom)},
|
||||||
|
+ { paddingBottom: Math.max(insets.bottom, a.pb_5xl.paddingBottom) },
|
||||||
|
]}>
|
||||||
|
- <View style={[a.w_full, a.gap_sm, {maxWidth: COL_WIDTH}]}>
|
||||||
|
+ <View style={[a.w_full, a.gap_sm, { maxWidth: COL_WIDTH }]}>
|
||||||
|
{primaryBtn}
|
||||||
|
{secondaryBtn}
|
||||||
|
</View>
|
||||||
|
diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx
|
||||||
|
index e058e2883..56a8055c0 100644
|
||||||
|
--- a/src/view/screens/Home.tsx
|
||||||
|
+++ b/src/view/screens/Home.tsx
|
||||||
|
@@ -1,52 +1,64 @@
|
||||||
|
import React from 'react'
|
||||||
|
-import {ActivityIndicator, StyleSheet} from 'react-native'
|
||||||
|
-import {useFocusEffect} from '@react-navigation/native'
|
||||||
|
+import { ActivityIndicator, StyleSheet } from 'react-native'
|
||||||
|
+import { useFocusEffect } from '@react-navigation/native'
|
||||||
|
|
||||||
|
-import {PROD_DEFAULT_FEED} from '#/lib/constants'
|
||||||
|
-import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||||
|
-import {useOTAUpdates} from '#/lib/hooks/useOTAUpdates'
|
||||||
|
-import {useSetTitle} from '#/lib/hooks/useSetTitle'
|
||||||
|
-import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
|
||||||
|
+import { PROD_DEFAULT_FEED } from '#/lib/constants'
|
||||||
|
+import { useNonReactiveCallback } from '#/lib/hooks/useNonReactiveCallback'
|
||||||
|
+import { useOTAUpdates } from '#/lib/hooks/useOTAUpdates'
|
||||||
|
+import { useSetTitle } from '#/lib/hooks/useSetTitle'
|
||||||
|
+import { useRequestNotificationsPermission } from '#/lib/notifications/notifications'
|
||||||
|
import {
|
||||||
|
type HomeTabNavigatorParams,
|
||||||
|
type NativeStackScreenProps,
|
||||||
|
} from '#/lib/routes/types'
|
||||||
|
-import {logEvent} from '#/lib/statsig/statsig'
|
||||||
|
-import {isWeb} from '#/platform/detection'
|
||||||
|
-import {emitSoftReset} from '#/state/events'
|
||||||
|
+import { logEvent } from '#/lib/statsig/statsig'
|
||||||
|
+import { isWeb } from '#/platform/detection'
|
||||||
|
+import { emitSoftReset } from '#/state/events'
|
||||||
|
import {
|
||||||
|
type SavedFeedSourceInfo,
|
||||||
|
usePinnedFeedsInfos,
|
||||||
|
} from '#/state/queries/feed'
|
||||||
|
-import {type FeedDescriptor, type FeedParams} from '#/state/queries/post-feed'
|
||||||
|
-import {usePreferencesQuery} from '#/state/queries/preferences'
|
||||||
|
-import {type UsePreferencesQueryResponse} from '#/state/queries/preferences/types'
|
||||||
|
-import {useSession} from '#/state/session'
|
||||||
|
-import {useSetMinimalShellMode} from '#/state/shell'
|
||||||
|
-import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||||
|
-import {useSelectedFeed, useSetSelectedFeed} from '#/state/shell/selected-feed'
|
||||||
|
-import {FeedPage} from '#/view/com/feeds/FeedPage'
|
||||||
|
-import {HomeHeader} from '#/view/com/home/HomeHeader'
|
||||||
|
+import { type FeedDescriptor, type FeedParams } from '#/state/queries/post-feed'
|
||||||
|
+import { usePreferencesQuery } from '#/state/queries/preferences'
|
||||||
|
+import { type UsePreferencesQueryResponse } from '#/state/queries/preferences/types'
|
||||||
|
+import { useSession } from '#/state/session'
|
||||||
|
+import { useSetMinimalShellMode } from '#/state/shell'
|
||||||
|
+import { useLoggedOutViewControls } from '#/state/shell/logged-out'
|
||||||
|
+import { useSelectedFeed, useSetSelectedFeed } from '#/state/shell/selected-feed'
|
||||||
|
+import { FeedPage } from '#/view/com/feeds/FeedPage'
|
||||||
|
+import { HomeHeader } from '#/view/com/home/HomeHeader'
|
||||||
|
import {
|
||||||
|
Pager,
|
||||||
|
type PagerRef,
|
||||||
|
type RenderTabBarFnProps,
|
||||||
|
} from '#/view/com/pager/Pager'
|
||||||
|
-import {CustomFeedEmptyState} from '#/view/com/posts/CustomFeedEmptyState'
|
||||||
|
-import {FollowingEmptyState} from '#/view/com/posts/FollowingEmptyState'
|
||||||
|
-import {FollowingEndOfFeed} from '#/view/com/posts/FollowingEndOfFeed'
|
||||||
|
-import {NoFeedsPinned} from '#/screens/Home/NoFeedsPinned'
|
||||||
|
+import { CustomFeedEmptyState } from '#/view/com/posts/CustomFeedEmptyState'
|
||||||
|
+import { FollowingEmptyState } from '#/view/com/posts/FollowingEmptyState'
|
||||||
|
+import { FollowingEndOfFeed } from '#/view/com/posts/FollowingEndOfFeed'
|
||||||
|
+import { NoFeedsPinned } from '#/screens/Home/NoFeedsPinned'
|
||||||
|
import * as Layout from '#/components/Layout'
|
||||||
|
-import {useDemoMode} from '#/storage/hooks/demo-mode'
|
||||||
|
+import { useDemoMode } from '#/storage/hooks/demo-mode'
|
||||||
|
|
||||||
|
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home' | 'Start'>
|
||||||
|
export function HomeScreen(props: Props) {
|
||||||
|
- const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||||
|
- const {data: preferences} = usePreferencesQuery()
|
||||||
|
- const {currentAccount} = useSession()
|
||||||
|
- const {data: pinnedFeedInfos, isLoading: isPinnedFeedsLoading} =
|
||||||
|
+ const { setShowLoggedOut } = useLoggedOutViewControls()
|
||||||
|
+ const { data: preferences } = usePreferencesQuery()
|
||||||
|
+ const { currentAccount } = useSession()
|
||||||
|
+ const { data: pinnedFeedInfos } =
|
||||||
|
usePinnedFeedsInfos()
|
||||||
|
|
||||||
|
+ const DEFAULT_PINNED_FEEDS = [{
|
||||||
|
+ feedDescriptor: 'following',
|
||||||
|
+ displayName: 'Following',
|
||||||
|
+ id: 'following',
|
||||||
|
+ type: 'feed',
|
||||||
|
+ savedFeed: undefined,
|
||||||
|
+ pinned: true,
|
||||||
|
+ }]
|
||||||
|
+
|
||||||
|
+ const safePreferences = preferences || { feedViewPrefs: { lab_mergeFeedEnabled: false }, savedFeeds: [] } as any
|
||||||
|
+ const safePinnedFeedInfos = pinnedFeedInfos || DEFAULT_PINNED_FEEDS
|
||||||
|
+
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (isWeb && !currentAccount) {
|
||||||
|
const getParams = new URLSearchParams(window.location.search)
|
||||||
|
@@ -77,13 +89,13 @@ export function HomeScreen(props: Props) {
|
||||||
|
setShowLoggedOut,
|
||||||
|
])
|
||||||
|
|
||||||
|
- if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) {
|
||||||
|
+ if (preferences || pinnedFeedInfos || !pinnedFeedInfos) {
|
||||||
|
return (
|
||||||
|
<Layout.Screen testID="HomeScreen">
|
||||||
|
<HomeScreenReady
|
||||||
|
{...props}
|
||||||
|
- preferences={preferences}
|
||||||
|
- pinnedFeedInfos={pinnedFeedInfos}
|
||||||
|
+ preferences={safePreferences}
|
||||||
|
+ pinnedFeedInfos={safePinnedFeedInfos as any}
|
||||||
|
/>
|
||||||
|
</Layout.Screen>
|
||||||
|
)
|
||||||
|
@@ -102,8 +114,8 @@ function HomeScreenReady({
|
||||||
|
preferences,
|
||||||
|
pinnedFeedInfos,
|
||||||
|
}: Props & {
|
||||||
|
- preferences: UsePreferencesQueryResponse
|
||||||
|
- pinnedFeedInfos: SavedFeedSourceInfo[]
|
||||||
|
+ preferences: any
|
||||||
|
+ pinnedFeedInfos: any
|
||||||
|
}) {
|
||||||
|
const allFeeds = React.useMemo(
|
||||||
|
() => pinnedFeedInfos.map(f => f.feedDescriptor),
|
||||||
|
@@ -136,7 +148,7 @@ function HomeScreenReady({
|
||||||
|
}
|
||||||
|
}, [selectedIndex])
|
||||||
|
|
||||||
|
- const {hasSession} = useSession()
|
||||||
|
+ const { hasSession } = useSession()
|
||||||
|
const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
|
useFocusEffect(
|
||||||
|
React.useCallback(() => {
|
||||||
|
@@ -204,7 +216,7 @@ function HomeScreenReady({
|
||||||
|
testID="homeScreenFeedTabs"
|
||||||
|
onPressSelected={onPressSelected}
|
||||||
|
// @ts-ignore
|
||||||
|
- feeds={[{displayName: 'Following'}, {displayName: 'Discover'}]}
|
||||||
|
+ feeds={[{ displayName: 'Following' }, { displayName: 'Discover' }]}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
@@ -234,8 +246,8 @@ function HomeScreenReady({
|
||||||
|
mergeFeedEnabled: Boolean(preferences.feedViewPrefs.lab_mergeFeedEnabled),
|
||||||
|
mergeFeedSources: preferences.feedViewPrefs.lab_mergeFeedEnabled
|
||||||
|
? preferences.savedFeeds
|
||||||
|
- .filter(f => f.type === 'feed' || f.type === 'list')
|
||||||
|
- .map(f => f.value)
|
||||||
|
+ .filter(f => f.type === 'feed' || f.type === 'list')
|
||||||
|
+ .map(f => f.value)
|
||||||
|
: [],
|
||||||
|
}
|
||||||
|
}, [preferences])
|
||||||
|
diff --git a/src/view/screens/License.tsx b/src/view/screens/License.tsx
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..f98cd6afc
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/view/screens/License.tsx
|
||||||
|
@@ -0,0 +1,86 @@
|
||||||
|
+import React from 'react'
|
||||||
|
+import { ScrollView } from 'react-native'
|
||||||
|
+import * as Layout from '#/components/Layout'
|
||||||
|
+import {useSetTitle} from '#/lib/hooks/useSetTitle'
|
||||||
|
+import {atoms as a, useTheme} from '#/alf'
|
||||||
|
+import {Text} from '#/components/Typography'
|
||||||
|
+
|
||||||
|
+export function LicenseScreen() {
|
||||||
|
+ useSetTitle('License')
|
||||||
|
+ const t = useTheme()
|
||||||
|
+
|
||||||
|
+ return (
|
||||||
|
+ <Layout.Screen>
|
||||||
|
+ <ScrollView
|
||||||
|
+ style={[a.flex_1, {backgroundColor: t.palette.white}]}
|
||||||
|
+ contentContainerStyle={[a.p_lg, a.pt_5xl, a.pb_5xl]}>
|
||||||
|
+ <Text style={[a.text_2xl, a.font_bold, a.mb_lg]}>License</Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ This application is based on Bluesky Social App.
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.text_md, a.mb_md, {color: t.palette.primary_500}]}>
|
||||||
|
+ https://github.com/bluesky-social/social-app
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.text_lg, a.font_bold, a.mt_lg, a.mb_md]}>MIT License</Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md, {fontFamily: 'monospace'}]}>
|
||||||
|
+ Copyright (c) 2022-2025 Bluesky PBC
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
+ of this software and associated documentation files (the "Software"), to deal
|
||||||
|
+ in the Software without restriction, including without limitation the rights
|
||||||
|
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
+ copies of the Software, and to permit persons to whom the Software is
|
||||||
|
+ furnished to do so, subject to the following conditions:
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ The above copyright notice and this permission notice shall be included in all
|
||||||
|
+ copies or substantial portions of the Software.
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
+ SOFTWARE.
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.text_lg, a.font_bold, a.mt_xl, a.mb_md]}>日本語訳(参考)</Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ 本ソフトウェアおよび関連文書ファイル(以下「ソフトウェア」)のコピーを取得する
|
||||||
|
+ すべての人に対し、ソフトウェアを無制限に扱うことを無償で許可します。これには、
|
||||||
|
+ ソフトウェアのコピーを使用、複製、変更、結合、公開、配布、サブライセンス、
|
||||||
|
+ および/または販売する権利、ならびにソフトウェアを提供する相手にそうした行為を
|
||||||
|
+ 許可する権利が含まれますが、これらに限定されません。
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ 上記の著作権表示および本許諾表示を、ソフトウェアのすべてのコピーまたは
|
||||||
|
+ 重要な部分に記載するものとします。
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.mb_md]}>
|
||||||
|
+ ソフトウェアは「現状のまま」で提供され、明示黙示を問わず、商品性、特定目的への
|
||||||
|
+ 適合性、および権利非侵害についての保証を含む、いかなる種類の保証もなされません。
|
||||||
|
+ いかなる場合においても、作者または著作権者は、契約行為、不法行為、またはそれ以外で
|
||||||
|
+ あろうと、ソフトウェアに起因または関連し、あるいはソフトウェアの使用または
|
||||||
|
+ その他の扱いによって生じる一切の請求、損害、その他の義務について責任を負わないものとします。
|
||||||
|
+ </Text>
|
||||||
|
+
|
||||||
|
+ <Text style={[a.text_sm, a.mt_xl, {color: t.palette.contrast_500}]}>
|
||||||
|
+ Original License: https://github.com/bluesky-social/social-app/blob/main/LICENSE
|
||||||
|
+ </Text>
|
||||||
|
+ </ScrollView>
|
||||||
|
+ </Layout.Screen>
|
||||||
|
+ )
|
||||||
|
+}
|
||||||
|
diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy.tsx
|
||||||
|
index a89eaadc4..19f5b4107 100644
|
||||||
|
--- a/src/view/screens/PrivacyPolicy.tsx
|
||||||
|
+++ b/src/view/screens/PrivacyPolicy.tsx
|
||||||
|
@@ -1,52 +1,13 @@
|
||||||
|
import React from 'react'
|
||||||
|
-import {View} from 'react-native'
|
||||||
|
-import {msg, Trans} from '@lingui/macro'
|
||||||
|
-import {useLingui} from '@lingui/react'
|
||||||
|
-import {useFocusEffect} from '@react-navigation/native'
|
||||||
|
-
|
||||||
|
-import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
|
-import {
|
||||||
|
- type CommonNavigatorParams,
|
||||||
|
- type NativeStackScreenProps,
|
||||||
|
-} from '#/lib/routes/types'
|
||||||
|
-import {s} from '#/lib/styles'
|
||||||
|
-import {useSetMinimalShellMode} from '#/state/shell'
|
||||||
|
-import {TextLink} from '#/view/com/util/Link'
|
||||||
|
-import {Text} from '#/view/com/util/text/Text'
|
||||||
|
-import {ScrollView} from '#/view/com/util/Views'
|
||||||
|
+import { WebView } from 'react-native-webview'
|
||||||
|
import * as Layout from '#/components/Layout'
|
||||||
|
-import {ViewHeader} from '../com/util/ViewHeader'
|
||||||
|
-
|
||||||
|
-type Props = NativeStackScreenProps<CommonNavigatorParams, 'PrivacyPolicy'>
|
||||||
|
-export const PrivacyPolicyScreen = (_props: Props) => {
|
||||||
|
- const pal = usePalette('default')
|
||||||
|
- const {_} = useLingui()
|
||||||
|
- const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
|
-
|
||||||
|
- useFocusEffect(
|
||||||
|
- React.useCallback(() => {
|
||||||
|
- setMinimalShellMode(false)
|
||||||
|
- }, [setMinimalShellMode]),
|
||||||
|
- )
|
||||||
|
+import { useSetTitle } from '#/lib/hooks/useSetTitle'
|
||||||
|
|
||||||
|
+export function PrivacyPolicyScreen() {
|
||||||
|
+ useSetTitle('Privacy Policy')
|
||||||
|
return (
|
||||||
|
<Layout.Screen>
|
||||||
|
- <ViewHeader title={_(msg`Privacy Policy`)} />
|
||||||
|
- <ScrollView style={[s.hContentRegion, pal.view]}>
|
||||||
|
- <View style={[s.p20]}>
|
||||||
|
- <Text style={pal.text}>
|
||||||
|
- <Trans>
|
||||||
|
- The Privacy Policy has been moved to{' '}
|
||||||
|
- <TextLink
|
||||||
|
- style={pal.link}
|
||||||
|
- href="https://bsky.social/about/support/privacy-policy"
|
||||||
|
- text="bsky.social/about/support/privacy-policy"
|
||||||
|
- />
|
||||||
|
- </Trans>
|
||||||
|
- </Text>
|
||||||
|
- </View>
|
||||||
|
- <View style={s.footerSpacer} />
|
||||||
|
- </ScrollView>
|
||||||
|
+ <WebView source={{ uri: 'https://syu.is/about/support/privacy-policy' }} style={{ flex: 1 }} />
|
||||||
|
</Layout.Screen>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
diff --git a/src/view/screens/TermsOfService.tsx b/src/view/screens/TermsOfService.tsx
|
||||||
|
index d843c713c..b96f112fc 100644
|
||||||
|
--- a/src/view/screens/TermsOfService.tsx
|
||||||
|
+++ b/src/view/screens/TermsOfService.tsx
|
||||||
|
@@ -1,50 +1,13 @@
|
||||||
|
import React from 'react'
|
||||||
|
-import {View} from 'react-native'
|
||||||
|
-import {msg, Trans} from '@lingui/macro'
|
||||||
|
-import {useLingui} from '@lingui/react'
|
||||||
|
-import {useFocusEffect} from '@react-navigation/native'
|
||||||
|
-
|
||||||
|
-import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
|
-import {
|
||||||
|
- type CommonNavigatorParams,
|
||||||
|
- type NativeStackScreenProps,
|
||||||
|
-} from '#/lib/routes/types'
|
||||||
|
-import {s} from '#/lib/styles'
|
||||||
|
-import {useSetMinimalShellMode} from '#/state/shell'
|
||||||
|
-import {TextLink} from '#/view/com/util/Link'
|
||||||
|
-import {Text} from '#/view/com/util/text/Text'
|
||||||
|
-import {ScrollView} from '#/view/com/util/Views'
|
||||||
|
+import { WebView } from 'react-native-webview'
|
||||||
|
import * as Layout from '#/components/Layout'
|
||||||
|
-import {ViewHeader} from '../com/util/ViewHeader'
|
||||||
|
-
|
||||||
|
-type Props = NativeStackScreenProps<CommonNavigatorParams, 'TermsOfService'>
|
||||||
|
-export const TermsOfServiceScreen = (_props: Props) => {
|
||||||
|
- const pal = usePalette('default')
|
||||||
|
- const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
|
- const {_} = useLingui()
|
||||||
|
-
|
||||||
|
- useFocusEffect(
|
||||||
|
- React.useCallback(() => {
|
||||||
|
- setMinimalShellMode(false)
|
||||||
|
- }, [setMinimalShellMode]),
|
||||||
|
- )
|
||||||
|
+import { useSetTitle } from '#/lib/hooks/useSetTitle'
|
||||||
|
|
||||||
|
+export function TermsOfServiceScreen() {
|
||||||
|
+ useSetTitle('Terms of Service')
|
||||||
|
return (
|
||||||
|
<Layout.Screen>
|
||||||
|
- <ViewHeader title={_(msg`Terms of Service`)} />
|
||||||
|
- <ScrollView style={[s.hContentRegion, pal.view]}>
|
||||||
|
- <View style={[s.p20]}>
|
||||||
|
- <Text style={pal.text}>
|
||||||
|
- <Trans>The Terms of Service have been moved to</Trans>{' '}
|
||||||
|
- <TextLink
|
||||||
|
- style={pal.link}
|
||||||
|
- href="https://bsky.social/about/support/tos"
|
||||||
|
- text="bsky.social/about/support/tos"
|
||||||
|
- />
|
||||||
|
- </Text>
|
||||||
|
- </View>
|
||||||
|
- <View style={s.footerSpacer} />
|
||||||
|
- </ScrollView>
|
||||||
|
+ <WebView source={{ uri: 'https://syu.is/about/support/tos' }} style={{ flex: 1 }} />
|
||||||
|
</Layout.Screen>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -15,14 +15,11 @@ PATCH_FILES_IOS=(
|
|||||||
"002-social-app-ios-lib.patch"
|
"002-social-app-ios-lib.patch"
|
||||||
"003-social-app-ios-view.patch"
|
"003-social-app-ios-view.patch"
|
||||||
"004-social-app-ios-core.patch"
|
"004-social-app-ios-core.patch"
|
||||||
"005-social-app-ios-screens.patch"
|
|
||||||
"006-social-app-ios-shell.patch"
|
"006-social-app-ios-shell.patch"
|
||||||
"007-social-app-ios-misc.patch"
|
"007-social-app-ios-misc.patch"
|
||||||
"008-social-app-ios-policy-tos-error.patch"
|
"016-social-app-ios-consolidated-fixes.patch"
|
||||||
"009-social-app-ios-license.patch"
|
|
||||||
"010-social-app-ios-remove-contact-support.patch"
|
"010-social-app-ios-remove-contact-support.patch"
|
||||||
"011-social-app-ios-splash-license-footer.patch"
|
"011-social-app-ios-splash-license-footer.patch"
|
||||||
"012-social-app-ios-settings-about-help.patch"
|
|
||||||
"013-social-app-ios-settings-remove-help.patch"
|
"013-social-app-ios-settings-remove-help.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -46,7 +43,7 @@ function apply-patch() {
|
|||||||
pushd ${target_dir} > /dev/null
|
pushd ${target_dir} > /dev/null
|
||||||
|
|
||||||
# Check if patch is already applied (reverse dry-run succeeds)
|
# Check if patch is already applied (reverse dry-run succeeds)
|
||||||
if patch --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then
|
if patch -f --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then
|
||||||
echo "✅ Already applied - skipping"
|
echo "✅ Already applied - skipping"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user