mirror of
https://github.com/tooot-app/app
synced 2025-04-03 05:01:35 +02:00
commit
2c151428ff
@ -57,7 +57,7 @@ private_lane :github_release do |options|
|
||||
description: "No changelog provided",
|
||||
commitish: git_branch,
|
||||
is_prerelease: options[:prerelease],
|
||||
upload_assets: options[:prerelease] ? nil : ["#{File.expand_path('..', Dir.pwd)}/tooot-#{GITHUB_RELEASE}.apk"]
|
||||
upload_assets: ["#{File.expand_path('..', Dir.pwd)}/tooot-#{GITHUB_RELEASE}.apk"]
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
PODS:
|
||||
- boost (1.76.0)
|
||||
- DoubleConversion (1.1.6)
|
||||
- EXApplication (4.0.1):
|
||||
- ExpoModulesCore
|
||||
- EXAV (10.2.1):
|
||||
- ExpoModulesCore
|
||||
- ReactCommon/turbomodule/core
|
||||
@ -20,12 +18,10 @@ PODS:
|
||||
- EXFirebaseCore
|
||||
- ExpoModulesCore
|
||||
- Firebase/Core (= 7.7.0)
|
||||
- EXFirebaseCore (4.1.0):
|
||||
- EXFirebaseCore (4.1.1):
|
||||
- ExpoModulesCore
|
||||
- Firebase/Core (= 7.7.0)
|
||||
- EXFont (10.0.5):
|
||||
- ExpoModulesCore
|
||||
- EXImageLoader (3.1.0):
|
||||
- EXImageLoader (3.1.1):
|
||||
- ExpoModulesCore
|
||||
- React-Core
|
||||
- EXImageManipulator (10.2.1):
|
||||
@ -33,10 +29,8 @@ PODS:
|
||||
- ExpoModulesCore
|
||||
- EXImagePicker (12.0.2):
|
||||
- ExpoModulesCore
|
||||
- EXJSONUtils (0.2.0)
|
||||
- EXKeepAwake (10.0.2):
|
||||
- ExpoModulesCore
|
||||
- EXManifests (0.2.2):
|
||||
- EXJSONUtils (0.2.1)
|
||||
- EXManifests (0.2.4):
|
||||
- EXJSONUtils
|
||||
- EXNotifications (0.14.1):
|
||||
- ExpoModulesCore
|
||||
@ -60,14 +54,14 @@ PODS:
|
||||
- React-Core
|
||||
- EXStoreReview (5.1.1):
|
||||
- ExpoModulesCore
|
||||
- EXStructuredHeaders (2.1.0)
|
||||
- EXStructuredHeaders (2.1.1)
|
||||
- EXUpdates (0.11.3):
|
||||
- EXManifests
|
||||
- ExpoModulesCore
|
||||
- EXStructuredHeaders
|
||||
- EXUpdatesInterface
|
||||
- React-Core
|
||||
- EXUpdatesInterface (0.5.0)
|
||||
- EXUpdatesInterface (0.5.1)
|
||||
- EXVideoThumbnails (6.2.0):
|
||||
- ExpoModulesCore
|
||||
- EXWebBrowser (10.1.1):
|
||||
@ -503,14 +497,13 @@ PODS:
|
||||
- Sentry (7.9.0):
|
||||
- Sentry/Core (= 7.9.0)
|
||||
- Sentry/Core (7.9.0)
|
||||
- UMTaskManagerInterface (7.1.0):
|
||||
- UMTaskManagerInterface (7.1.1):
|
||||
- ExpoModulesCore
|
||||
- Yoga (1.14.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
|
||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||
- EXApplication (from `../node_modules/expo-application/ios`)
|
||||
- EXAV (from `../node_modules/expo-av/ios`)
|
||||
- EXConstants (from `../node_modules/expo-constants/ios`)
|
||||
- EXCrypto (from `../node_modules/expo-crypto/ios`)
|
||||
@ -519,12 +512,10 @@ DEPENDENCIES:
|
||||
- EXFileSystem (from `../node_modules/expo-file-system/ios`)
|
||||
- EXFirebaseAnalytics (from `../node_modules/expo-firebase-analytics/ios`)
|
||||
- EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`)
|
||||
- EXFont (from `../node_modules/expo-font/ios`)
|
||||
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
|
||||
- EXImageManipulator (from `../node_modules/expo-image-manipulator/ios`)
|
||||
- EXImagePicker (from `../node_modules/expo-image-picker/ios`)
|
||||
- EXJSONUtils (from `../node_modules/expo-json-utils/ios`)
|
||||
- EXKeepAwake (from `../node_modules/expo-keep-awake/ios`)
|
||||
- EXManifests (from `../node_modules/expo-manifests/ios`)
|
||||
- EXNotifications (from `../node_modules/expo-notifications/ios`)
|
||||
- Expo (from `../node_modules/expo/ios`)
|
||||
@ -615,8 +606,6 @@ EXTERNAL SOURCES:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
|
||||
DoubleConversion:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
|
||||
EXApplication:
|
||||
:path: "../node_modules/expo-application/ios"
|
||||
EXAV:
|
||||
:path: "../node_modules/expo-av/ios"
|
||||
EXConstants:
|
||||
@ -633,8 +622,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/expo-firebase-analytics/ios"
|
||||
EXFirebaseCore:
|
||||
:path: "../node_modules/expo-firebase-core/ios"
|
||||
EXFont:
|
||||
:path: "../node_modules/expo-font/ios"
|
||||
EXImageLoader:
|
||||
:path: "../node_modules/expo-image-loader/ios"
|
||||
EXImageManipulator:
|
||||
@ -643,8 +630,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/expo-image-picker/ios"
|
||||
EXJSONUtils:
|
||||
:path: "../node_modules/expo-json-utils/ios"
|
||||
EXKeepAwake:
|
||||
:path: "../node_modules/expo-keep-awake/ios"
|
||||
EXManifests:
|
||||
:path: "../node_modules/expo-manifests/ios"
|
||||
EXNotifications:
|
||||
@ -769,7 +754,6 @@ EXTERNAL SOURCES:
|
||||
SPEC CHECKSUMS:
|
||||
boost: a7c83b31436843459a1961bfd74b96033dc77234
|
||||
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
|
||||
EXApplication: bdc8dc27713235565da1029a34385229f31b8e08
|
||||
EXAV: b9ed0c201092244c46aa78f907f5c66176bed236
|
||||
EXConstants: 88bf79622fbd9b476c96d8ec57fe97ca44fe8e3c
|
||||
EXCrypto: ab2ba0df3136a5f2407b8c7e70eb498ac20d704f
|
||||
@ -777,14 +761,12 @@ SPEC CHECKSUMS:
|
||||
EXErrorRecovery: b0d7582714a2cc896e94a2308a356f94dbf14ef7
|
||||
EXFileSystem: 7bcd3c1428698150d5c8ca140c8183f2ee204048
|
||||
EXFirebaseAnalytics: a7ec2dd1394ad0de5c0c63fac0deee496f798284
|
||||
EXFirebaseCore: 16f39b0ea94ce985a8f2e16cc796bf79bdcfa297
|
||||
EXFont: 2597c10ac85a69d348d44d7873eccf5a7576ef5e
|
||||
EXImageLoader: df83442d32bcfb57b7cfc5690096b6caf8203f8d
|
||||
EXFirebaseCore: 52151d0b008b99983e6a120cea94466ee760a4e9
|
||||
EXImageLoader: 347b72c2ec2df65120ccec40ea65a4c4f24317ff
|
||||
EXImageManipulator: 60d1bf3f1d7709453b1feb38adf8594b7f58710f
|
||||
EXImagePicker: bf4d62532cc2bf217edbe4abbb0014e73e079eac
|
||||
EXJSONUtils: f515cf71710855d7ba5bfc6752af3b9a6f6aad01
|
||||
EXKeepAwake: bf48d7f740a5cd2befed6cf9a49911d385c6c47d
|
||||
EXManifests: 50e42e01335df4e54109dee7be5a91bfd37347db
|
||||
EXJSONUtils: 5ee0d5cf76da70ad86f0be1a41cc70f47d69e06f
|
||||
EXManifests: d3464cd2278f4a19cd80c1aa673231570b534c11
|
||||
EXNotifications: a7d582fa800d77f4a75bd22d52e84e2fbcee26df
|
||||
Expo: 534e51e607aba8229293297da5585f4b26f50fa1
|
||||
ExpoHaptics: 0d0b69b2414755a4057ffad0a10315902c0ea1b7
|
||||
@ -795,9 +777,9 @@ SPEC CHECKSUMS:
|
||||
EXSecureStore: b80c74c5ee29d0160c2aace3fd9a24a5edc20015
|
||||
EXSplashScreen: 21669e598804ee810547dbb6692c8deb5dd8dbf3
|
||||
EXStoreReview: 5a24fd222d193878a7d4f6059dd19f51c808af66
|
||||
EXStructuredHeaders: 2ce79a3770bd3795bade1aab215ada70deae8bbc
|
||||
EXStructuredHeaders: 4993087b2010dbcc510f5d92555b36f523425e8d
|
||||
EXUpdates: 98b9e647ce7a0e9d5ab67135bf42188c750a99eb
|
||||
EXUpdatesInterface: f459b515151bd73fff7a35366eace34a6c6a0d3f
|
||||
EXUpdatesInterface: a9814f422d3cd6e7cfd260d13c27786148ece20e
|
||||
EXVideoThumbnails: 847d648d6f4bc0c1afad05caa56a487dc543445e
|
||||
EXWebBrowser: f1573262c5de753987ed526c630076eda130804d
|
||||
FBLazyVector: e5569e42a1c79ca00521846c223173a57aca1fe1
|
||||
@ -859,7 +841,7 @@ SPEC CHECKSUMS:
|
||||
SDWebImage: 53179a2dba77246efa8a9b85f5c5b21f8f43e38f
|
||||
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
|
||||
Sentry: 2f7e91f247cfb05b05bd01e0b5d0692557a7687b
|
||||
UMTaskManagerInterface: 6f7150f9ec9bc6f2760eeae532a70de71ff951c1
|
||||
UMTaskManagerInterface: 3184c93ecc290bd422c6e344badc89b601e9c29b
|
||||
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280
|
||||
|
||||
PODFILE CHECKSUM: 9bf9d386bac4ff98f76fc93f120c9922660384b5
|
||||
|
27
package.json
27
package.json
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "tooot",
|
||||
"versions": {
|
||||
"native": "220206",
|
||||
"native": "220209",
|
||||
"major": 3,
|
||||
"minor": 4,
|
||||
"minor": 5,
|
||||
"patch": 0,
|
||||
"expo": "44.0.0"
|
||||
},
|
||||
@ -115,5 +115,26 @@
|
||||
"postinstall-postinstall": "2.1.0",
|
||||
"react-native-clean-project": "4.0.0",
|
||||
"typescript": "4.5.5"
|
||||
},
|
||||
"expo": {
|
||||
"autolinking": {
|
||||
"ios": {
|
||||
"exclude": [
|
||||
"expo-application",
|
||||
"expo-font",
|
||||
"expo-keep-awake"
|
||||
]
|
||||
},
|
||||
"android": {
|
||||
"exclude": [
|
||||
"expo-application",
|
||||
"expo-firebase-analytics",
|
||||
"expo-firebase-core",
|
||||
"expo-font",
|
||||
"expo-keep-awake",
|
||||
"expo-store-review"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -53,7 +53,9 @@ const apiTooot = async <T = unknown>({
|
||||
Accept: '*/*',
|
||||
...headers
|
||||
},
|
||||
...(body && { data: body })
|
||||
...(body && { data: body }),
|
||||
validateStatus: status =>
|
||||
url.includes('translate') ? status < 500 : status === 200
|
||||
})
|
||||
.then(response => {
|
||||
return Promise.resolve({
|
||||
|
@ -32,6 +32,9 @@ const TimelineTranslate = React.memo(
|
||||
|
||||
const settingsLanguage = useSelector(getSettingsLanguage)
|
||||
|
||||
if (Localization.locale.includes(tootLanguage)) {
|
||||
return null
|
||||
}
|
||||
if (settingsLanguage?.includes(tootLanguage)) {
|
||||
return null
|
||||
}
|
||||
@ -88,13 +91,19 @@ const TimelineTranslate = React.memo(
|
||||
{isError
|
||||
? t('shared.translate.failed')
|
||||
: isSuccess
|
||||
? t('shared.translate.succeed', {
|
||||
provider: data?.provider,
|
||||
source: data?.sourceLanguage
|
||||
})
|
||||
? typeof data?.error === 'string'
|
||||
? t(`shared.translate.${data.error}`)
|
||||
: t('shared.translate.succeed', {
|
||||
provider: data?.provider,
|
||||
source: data?.sourceLanguage
|
||||
})
|
||||
: t('shared.translate.default')}
|
||||
</Text>
|
||||
<Text>
|
||||
{__DEV__
|
||||
? ` Source: ${status.language}; Target: ${settingsLanguage}`
|
||||
? ` Source: ${status.language}; Target: ${
|
||||
Localization.locale || settingsLanguage || 'en'
|
||||
}`
|
||||
: undefined}
|
||||
</Text>
|
||||
{isLoading ? (
|
||||
@ -105,7 +114,7 @@ const TimelineTranslate = React.memo(
|
||||
/>
|
||||
) : null}
|
||||
</Pressable>
|
||||
{data
|
||||
{data && data.error === undefined
|
||||
? data.text.map((d, i) => (
|
||||
<ParseHTML
|
||||
key={i}
|
||||
|
@ -81,7 +81,9 @@
|
||||
"translate": {
|
||||
"default": "Translate",
|
||||
"succeed": "Translated by {{provider}} from {{source}}",
|
||||
"failed": "Translation failed"
|
||||
"failed": "Translation failed",
|
||||
"source_not_supported": "toot's language is not supported",
|
||||
"target_not_supported": "The target language is not supported"
|
||||
},
|
||||
"header": {
|
||||
"shared": {
|
||||
|
@ -12,7 +12,7 @@
|
||||
"message": "居然刷到底了,喝杯 <0 /> 吧"
|
||||
},
|
||||
"lookback": {
|
||||
"message": "上次阅读至"
|
||||
"message": "最后阅读于"
|
||||
},
|
||||
"refresh": {
|
||||
"fetchPreviousPage": "较新于此的嘟嘟",
|
||||
@ -81,7 +81,9 @@
|
||||
"translate": {
|
||||
"default": "翻译",
|
||||
"succeed": "由{{provider}}翻译自{{source}}",
|
||||
"failed": "翻译失败"
|
||||
"failed": "翻译失败",
|
||||
"source_not_supported": "不支持嘟文的语言",
|
||||
"target_not_supported": "不支持目标翻译语言"
|
||||
},
|
||||
"header": {
|
||||
"shared": {
|
||||
|
@ -64,7 +64,7 @@ const SettingsApp: React.FC = () => {
|
||||
cancelButtonIndex: options.length - 1
|
||||
},
|
||||
buttonIndex => {
|
||||
if (!buttonIndex) return
|
||||
if (buttonIndex === undefined) return
|
||||
if (buttonIndex < options.length - 1) {
|
||||
analytics('settings_language_press', {
|
||||
current: i18n.language,
|
||||
|
@ -71,10 +71,10 @@ const netInfo = async (): Promise<{
|
||||
loadPage = 'LocalPublic'
|
||||
}
|
||||
|
||||
await initQuery({
|
||||
instance,
|
||||
prefetch: { enabled: true, page: loadPage }
|
||||
})
|
||||
// await initQuery({
|
||||
// instance,
|
||||
// prefetch: { enabled: true, page: loadPage }
|
||||
// })
|
||||
}
|
||||
|
||||
return Promise.resolve({ connected: true })
|
||||
|
@ -1,6 +1,6 @@
|
||||
import queryClient from '@helpers/queryClient'
|
||||
import { store } from '@root/store'
|
||||
import { prefetchTimelineQuery } from './queryHooks/timeline'
|
||||
// import { prefetchTimelineQuery } from './queryHooks/timeline'
|
||||
import { Instance, updateInstanceActive } from './slices/instancesSlice'
|
||||
|
||||
const initQuery = async ({
|
||||
@ -13,20 +13,20 @@ const initQuery = async ({
|
||||
store.dispatch(updateInstanceActive(instance))
|
||||
await queryClient.resetQueries()
|
||||
|
||||
if (prefetch?.enabled && instance.timelinesLookback) {
|
||||
if (
|
||||
prefetch.page &&
|
||||
instance.timelinesLookback[prefetch.page]?.ids?.length > 0
|
||||
) {
|
||||
await prefetchTimelineQuery(instance.timelinesLookback[prefetch.page])
|
||||
}
|
||||
// if (prefetch?.enabled && instance.timelinesLookback) {
|
||||
// if (
|
||||
// prefetch.page &&
|
||||
// instance.timelinesLookback[prefetch.page]?.ids?.length > 0
|
||||
// ) {
|
||||
// await prefetchTimelineQuery(instance.timelinesLookback[prefetch.page])
|
||||
// }
|
||||
|
||||
for (const page of Object.keys(instance.timelinesLookback)) {
|
||||
if (page !== prefetch.page) {
|
||||
prefetchTimelineQuery(instance.timelinesLookback[page])
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (const page of Object.keys(instance.timelinesLookback)) {
|
||||
// if (page !== prefetch.page) {
|
||||
// prefetchTimelineQuery(instance.timelinesLookback[page])
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
export default initQuery
|
||||
|
@ -3,11 +3,19 @@ import haptics from '@components/haptics'
|
||||
import { AxiosError } from 'axios'
|
||||
import { QueryFunctionContext, useQuery, UseQueryOptions } from 'react-query'
|
||||
|
||||
type Translations = {
|
||||
provider: string
|
||||
sourceLanguage: string
|
||||
text: string[]
|
||||
}
|
||||
type Translations =
|
||||
| {
|
||||
error: undefined
|
||||
provider: string
|
||||
sourceLanguage: string
|
||||
text: string[]
|
||||
}
|
||||
| {
|
||||
error: string
|
||||
provider: undefined
|
||||
sourceLanguage: undefined
|
||||
text: undefined
|
||||
}
|
||||
|
||||
export type QueryKeyTranslate = [
|
||||
'Translate',
|
||||
|
@ -30,7 +30,7 @@ const versionSlice = createSlice({
|
||||
extraReducers: builder => {
|
||||
builder.addCase(retriveVersionLatest.fulfilled, (state, action) => {
|
||||
if (action.payload && Constants.manifest?.version) {
|
||||
if (parseInt(action.payload) > parseInt(Constants.manifest.version)) {
|
||||
if (parseFloat(action.payload) > parseFloat(Constants.manifest.version)) {
|
||||
state.update = true
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user