diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c27497fe..66d35884 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -35,7 +35,6 @@ private_lane :build_ios do build_ios_app( export_method: "app-store", include_symbols: true, - include_bitcode: true, output_directory: BUILD_DIRECTORY, silent: false ) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 787f5853..15433266 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -20,11 +20,11 @@ PODS: - EXFirebaseCore (5.2.0): - ExpoModulesCore - Firebase/Core (= 9.5.0) - - EXFont (10.2.0): + - EXFont (10.2.1): - ExpoModulesCore - EXNotifications (0.16.1): - ExpoModulesCore - - Expo (46.0.10): + - Expo (46.0.15): - ExpoModulesCore - ExpoCrypto (11.0.0): - ExpoModulesCore @@ -34,7 +34,7 @@ PODS: - ExpoModulesCore - ExpoLocalization (13.1.0): - ExpoModulesCore - - ExpoModulesCore (0.11.5): + - ExpoModulesCore (0.11.7): - React-Core - ReactCommon/turbomodule/core - ExpoRandom (12.3.0): @@ -408,7 +408,7 @@ PODS: - React-Core - react-native-blurhash (1.1.10): - React-Core - - react-native-cameraroll (4.1.2): + - react-native-cameraroll (5.0.4): - React-Core - react-native-context-menu-view (1.5.4): - React @@ -416,14 +416,14 @@ PODS: - React-Core - react-native-language-detection (0.1.0): - React - - react-native-netinfo (9.3.2): + - react-native-netinfo (9.3.4): - React-Core - - react-native-pager-view (6.0.0): + - react-native-pager-view (6.0.1): - React-Core - - react-native-paste-input (0.5.0): + - react-native-paste-input (0.5.1): - React-Core - Swime (= 3.0.6) - - react-native-safe-area-context (4.3.4): + - react-native-safe-area-context (4.4.1): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -536,7 +536,7 @@ PODS: - React-Core - SDWebImage (~> 5.13.4) - SDWebImageWebPCoder (~> 0.9.0) - - RNGestureHandler (2.6.2): + - RNGestureHandler (2.7.1): - React-Core - RNReanimated (2.10.0): - DoubleConversion @@ -565,12 +565,12 @@ PODS: - React-RCTText - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.17.0): + - RNScreens (3.18.1): - React-Core - React-RCTImage - - RNSentry (4.5.0): + - RNSentry (4.6.1): - React-Core - - Sentry (= 7.25.1) + - Sentry (= 7.27.1) - RNShareMenu (6.0.0): - React - RNSVG (13.0.0): @@ -581,9 +581,9 @@ PODS: - SDWebImageWebPCoder (0.9.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.13) - - Sentry (7.25.1): - - Sentry/Core (= 7.25.1) - - Sentry/Core (7.25.1) + - Sentry (7.27.1): + - Sentry/Core (= 7.27.1) + - Sentry/Core (7.27.1) - Swime (3.0.6) - Yoga (1.14.0) @@ -638,7 +638,7 @@ DEPENDENCIES: - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - "react-native-blur (from `../node_modules/@react-native-community/blur`)" - react-native-blurhash (from `../node_modules/react-native-blurhash`) - - "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)" + - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)" - react-native-context-menu-view (from `../node_modules/react-native-context-menu-view`) - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-language-detection (from `../node_modules/react-native-language-detection`) @@ -783,7 +783,7 @@ EXTERNAL SOURCES: react-native-blurhash: :path: "../node_modules/react-native-blurhash" react-native-cameraroll: - :path: "../node_modules/@react-native-community/cameraroll" + :path: "../node_modules/@react-native-camera-roll/camera-roll" react-native-context-menu-view: :path: "../node_modules/react-native-context-menu-view" react-native-image-picker: @@ -855,14 +855,14 @@ SPEC CHECKSUMS: EXFileSystem: 927e0a8885aa9c49e50fc38eaba2c2389f2f1019 EXFirebaseAnalytics: 2e478758e153b908b67477dff7adf99ffbf37a1b EXFirebaseCore: cb1e6afad20c4c32a4966432c78ebfff29d8db6b - EXFont: a5d80bd9b3452b2d5abbce2487da89b0150e6487 + EXFont: 06df627203afcb8a3b3152ec06eb2f11f46f0cff EXNotifications: 9a2aa201deb19dfe1dbe0e370eeb2922de0d2422 - Expo: fcdb32274e2ca9c7638d3b21b30fb665c6869219 + Expo: 7e821e708a35d2720ef6baa658e224dd91c4821e ExpoCrypto: e534314db0e1a17ae12b5140d529bd0c5efcbc6a ExpoHaptics: efe9e68e9dfe0d15c183c0c70a25f3874124ab9e ExpoKeepAwake: 0e8f18142e71bbf2c7f6aa66ebed249ba1420320 ExpoLocalization: 63204f4b9d4f653469d266332ceaa6c6ac8a305d - ExpoModulesCore: 5a973701f4400d70254bc836305228731c829010 + ExpoModulesCore: 2d60ec04c49641afb55fee3faac86fb108c68fe0 ExpoRandom: f9f1faa299a40733867f344d6b7bfa2d1f4ab04d ExpoWebBrowser: 5804ac42a8269d0e534bc4461993005f72535649 EXScreenCapture: 23de056fdb02edd1fb8f147b0fd198c6d5cada3d @@ -905,14 +905,14 @@ SPEC CHECKSUMS: React-logger: ebb4d31bbbe4f1a8a1a9b658d7429210b8f68160 react-native-blur: 3e9c8e8e9f7d17fa1b94e1a0ae9fd816675f5382 react-native-blurhash: add4df9a937b4e021a24bc67a0714f13e0bd40b7 - react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 + react-native-cameraroll: 38b40d9033e4077b6c603f92f95c6d05fa7907df react-native-context-menu-view: b0beca02aad4bd9f9d7d932bf437e0a03baa69ef react-native-image-picker: 4bc9ed38c8be255b515d8c88babbaf74973f91a8 react-native-language-detection: 0e43195ad014974f1b7a31b64820eff34a243f2d - react-native-netinfo: 687904c63baa828543bb6e94c265977e0ac70f14 - react-native-pager-view: e76d64a5114a152e942caa09136e4e250709378c - react-native-paste-input: 3037f113267c367e863790bcfd57cdb3ace3cad6 - react-native-safe-area-context: dfe5aa13bee37a0c7e8059d14f72ffc076d120e9 + react-native-netinfo: 6ac9bcc7c88dc51717bda3484eb99093acb755e0 + react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca + react-native-paste-input: 183ad7dc224e192719616f4258dde5b548627d08 + react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 React-perflogger: 1fb1ad5333b43a5137afd7608695f7a42c5efd27 React-RCTActionSheet: a435bd67689433575a1e5d7614b021d2c17f0726 @@ -929,15 +929,15 @@ SPEC CHECKSUMS: RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd RNFastImage: e6267e27581b81918ebef6432c94c20718ec3b91 - RNGestureHandler: 4defbd70b2faf3d6761b82fa7880285241762cb0 + RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122 RNReanimated: 7faa787e8d4493fbc95fab2ad331fa7625828cfa - RNScreens: 0df01424e9e0ed7827200d6ed1087ddd06c493f9 - RNSentry: a034d0e81e3d3c04b770dd2df953fe634d372d22 + RNScreens: 1b7bb502dac62cc4cf01b94bea591c8da275132f + RNSentry: f8591057d48d4f6d64196a76cbca67895667b033 RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3 RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff SDWebImage: e5cc87bf736e60f49592f307bdf9e157189298a3 SDWebImageWebPCoder: 18503de6621dd2c420d680e33d46bf8e1d5169b0 - Sentry: dd29c18c32b0af9269949f079cf631d581ca76ca + Sentry: bc644307e2eb6a4c9c55cf117a80b895bb2a25a7 Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d diff --git a/ios/ja.lproj/InfoPlist.strings b/ios/ja.lproj/InfoPlist.strings new file mode 100644 index 00000000..025e9777 --- /dev/null +++ b/ios/ja.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"NSPhotoLibraryAddUsageDescription" = "tooot が画像をカメラロールに保存できるようにします"; +"NSPhotoLibraryUsageDescription" = "tooot が画像をカメラロールに保存できるようにします"; diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 4191bd59..413887e6 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -81,6 +81,7 @@ E69EBACC28DF28420057EDEC /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACD28DF284D0057EDEC /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = ""; }; E69EBACE28DF28560057EDEC /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/InfoPlist.strings; sourceTree = ""; }; + E6C8B26628F5F9FC0062CF2E /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; /* End PBXFileReference section */ @@ -287,6 +288,7 @@ ko, "pt-BR", vi, + ja, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; @@ -338,7 +340,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\nexport SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI_PATH=\"../node_modules/@sentry/cli/bin/sentry-cli\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE\\\"\""; + shellScript = "set -e\nexport SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI_PATH=\"../node_modules/@sentry/cli/bin/sentry-cli\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE\\\"\"\n"; }; 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -511,6 +513,7 @@ E69EBACC28DF28420057EDEC /* ko */, E69EBACD28DF284D0057EDEC /* pt-BR */, E69EBACE28DF28560057EDEC /* vi */, + E6C8B26628F5F9FC0062CF2E /* ja */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/package.json b/package.json index 530eea86..e10100d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tooot", - "version": "4.3.3", + "version": "4.3.4", "description": "tooot app for Mastodon", "author": "xmflsct ", "license": "GPL-3.0-or-later", @@ -18,30 +18,30 @@ "postinstall": "patch-package" }, "dependencies": { - "@expo/react-native-action-sheet": "^3.13.0", + "@expo/react-native-action-sheet": "^3.14.0", "@formatjs/intl-datetimeformat": "^6.2.0", "@formatjs/intl-getcanonicallocales": "^2.0.4", "@formatjs/intl-locale": "^3.0.6", "@formatjs/intl-numberformat": "^8.1.3", "@formatjs/intl-pluralrules": "^5.1.3", "@formatjs/intl-relativetimeformat": "^11.1.3", - "@mattermost/react-native-paste-input": "^0.5.0", + "@mattermost/react-native-paste-input": "^0.5.1", "@neverdull-agency/expo-unlimited-secure-store": "^1.0.10", "@react-native-async-storage/async-storage": "^1.17.10", + "@react-native-camera-roll/camera-roll": "^5.0.4", "@react-native-clipboard/clipboard": "^1.11.1", "@react-native-community/blur": "^4.2.0", - "@react-native-community/cameraroll": "^4.1.2", - "@react-native-community/netinfo": "^9.3.2", + "@react-native-community/netinfo": "^9.3.4", "@react-native-community/segmented-control": "^2.2.2", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", - "@react-navigation/native-stack": "^6.9.0", - "@react-navigation/stack": "^6.3.1", - "@reduxjs/toolkit": "^1.8.5", - "@sentry/react-native": "^4.5.0", + "@react-navigation/native-stack": "^6.9.1", + "@react-navigation/stack": "^6.3.2", + "@reduxjs/toolkit": "^1.8.6", + "@sentry/react-native": "^4.6.1", "@sharcoux/slider": "^6.0.3", "axios": "^0.27.2", - "expo": "^46.0.10", + "expo": "^46.0.15", "expo-auth-session": "^3.7.1", "expo-av": "^12.0.4", "expo-constants": "^13.2.4", @@ -59,7 +59,7 @@ "expo-store-review": "^5.3.0", "expo-video-thumbnails": "^6.4.0", "expo-web-browser": "^11.0.0", - "i18next": "^21.9.2", + "i18next": "^21.10.0", "li": "^1.3.0", "linkify-it": "^4.0.1", "lodash": "^4.17.21", @@ -75,24 +75,23 @@ "react-native-fast-image": "^8.6.1", "react-native-feather": "^1.1.2", "react-native-flash-message": "^0.3.1", - "react-native-gesture-handler": "^2.6.2", + "react-native-gesture-handler": "^2.7.1", "react-native-htmlview": "^0.16.0", "react-native-image-picker": "^4.10.0", "react-native-language-detection": "^0.1.0", - "react-native-pager-view": "^6.0.0", + "react-native-pager-view": "^6.0.1", "react-native-reanimated": "^2.10.0", "react-native-reanimated-zoom": "^0.3.1", - "react-native-safe-area-context": "^4.3.4", - "react-native-screens": "^3.17.0", + "react-native-safe-area-context": "^4.4.1", + "react-native-screens": "^3.18.1", "react-native-share-menu": "^6.0.0", "react-native-svg": "13.0.0", "react-native-swipe-list-view": "^3.2.9", - "react-native-tab-view": "^3.1.1", + "react-native-tab-view": "^3.3.0", "react-query": "^3.39.2", "react-redux": "^8.0.4", "redux-persist": "^6.0.0", "rn-placeholder": "^3.0.3", - "tslib": "^2.4.0", "valid-url": "^1.0.9" }, "devDependencies": { @@ -114,10 +113,10 @@ "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-transform-remove-console": "^6.9.4", "chalk": "^4.1.2", - "dotenv": "^16.0.2", + "dotenv": "^16.0.3", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.1.0", "react-native-clean-project": "^4.0.1", - "typescript": "^4.8.3" + "typescript": "^4.8.4" } } diff --git a/src/App.tsx b/src/App.tsx index 17c57664..d88682bf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,7 @@ import * as Sentry from '@sentry/react-native' import AccessibilityManager from '@utils/accessibility/AccessibilityManager' import { changeLanguage, getSettingsLanguage } from '@utils/slices/settingsSlice' import ThemeManager from '@utils/styles/ThemeManager' +import * as Localization from 'expo-localization' import * as SplashScreen from 'expo-splash-screen' import React, { useCallback, useEffect, useState } from 'react' import { LogBox, Platform } from 'react-native' @@ -81,9 +82,15 @@ const App: React.FC = () => { log('log', 'App', 'bootstrapped') if (bootstrapped) { log('log', 'App', 'loading actual app :)') - const language = getSettingsLanguage(store.getState()) + log('log', 'App', `Locale: ${Localization.locale}`) + const language = + Platform.OS === 'ios' + ? Localization.locale + : getSettingsLanguage(store.getState()) if (!language) { - store.dispatch(changeLanguage('en')) + if (Platform.OS !== 'ios') { + store.dispatch(changeLanguage('en')) + } i18n.changeLanguage('en') } else { i18n.changeLanguage(language) diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index b42b28c8..bd0fd13a 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -76,9 +76,7 @@ const renderNode = ({ ) } else if (classes.includes('mention') && mentions) { - const accountIndex = mentions.findIndex( - mention => mention.url === href - ) + const accountIndex = mentions.findIndex(mention => mention.url === href) const differentAccount = routeParams?.account ? routeParams.account.id !== mentions[accountIndex]?.id : true @@ -86,8 +84,7 @@ const renderNode = ({ `#${tag.name}` === content).length > 0 + const content = node.children && node.children[0] && node.children[0].data + const shouldBeTag = tags && tags.filter(tag => `#${tag.name}` === content).length > 0 return ( - {(content && content !== href && content) || - (showFullLink ? href : domain[1])} + {(content && content !== href && content) || (showFullLink ? href : domain[1])} {!shouldBeTag ? ( >() + const navigation = useNavigation>() const route = useRoute() const { colors, theme } = useTheme() const { t, i18n } = useTranslation('componentParse') @@ -254,7 +247,7 @@ const ParseHTML = React.memo( return ( - {typeof totalLines === 'number' ? ( + {typeof totalLines === 'number' || numberOfLines === 1 ? ( { @@ -296,10 +289,7 @@ const ParseHTML = React.memo( { - if ( - numberOfLines === 1 || - nativeEvent.lines.length >= numberOfLines + 5 - ) { + if (numberOfLines === 1 || nativeEvent.lines.length >= numberOfLines + 5) { setTotalLines(nativeEvent.lines.length) } }} @@ -307,11 +297,7 @@ const ParseHTML = React.memo( height: numberOfLines === 1 && !expanded ? 0 : undefined }} numberOfLines={ - typeof totalLines === 'number' - ? expanded - ? 999 - : numberOfLines - : undefined + typeof totalLines === 'number' ? (expanded ? 999 : numberOfLines) : undefined } selectable={selectable} /> diff --git a/src/components/Timeline/Shared/Attachment/Video.tsx b/src/components/Timeline/Shared/Attachment/Video.tsx index 054c1077..6771438d 100644 --- a/src/components/Timeline/Shared/Attachment/Video.tsx +++ b/src/components/Timeline/Shared/Attachment/Video.tsx @@ -7,6 +7,7 @@ import { Blurhash } from 'react-native-blurhash' import attachmentAspectRatio from './aspectRatio' import analytics from '@components/analytics' import AttachmentAltText from './AltText' +import { Platform } from 'expo-modules-core' export interface Props { total: number @@ -27,6 +28,7 @@ const AttachmentVideo: React.FC = ({ const [videoLoading, setVideoLoading] = useState(false) const [videoLoaded, setVideoLoaded] = useState(false) const [videoPosition, setVideoPosition] = useState(0) + const [videoResizeMode, setVideoResizeMode] = useState(ResizeMode.COVER) const playOnPress = useCallback(async () => { analytics('timeline_shared_attachment_video_length', { length: video.meta?.length @@ -39,6 +41,7 @@ const AttachmentVideo: React.FC = ({ if (!videoLoaded) { await videoPlayer.current?.loadAsync({ uri: video.url }) } + Platform.OS === 'android' && setVideoResizeMode(ResizeMode.CONTAIN) await videoPlayer.current?.setPositionAsync(videoPosition) await videoPlayer.current?.presentFullscreenPlayer() videoPlayer.current?.playAsync() @@ -62,11 +65,7 @@ const AttachmentVideo: React.FC = ({ const _handleAppStateChange = async (nextAppState: AppStateStatus) => { if (appState.current.match(/active/) && nextAppState.match(/inactive/)) { await videoPlayer.current?.pauseAsync() - } else if ( - gifv && - appState.current.match(/background/) && - nextAppState.match(/active/) - ) { + } else if (gifv && appState.current.match(/background/) && nextAppState.match(/active/)) { await videoPlayer.current?.setIsMutedAsync(true) await videoPlayer.current?.playAsync() } @@ -99,7 +98,7 @@ const AttachmentVideo: React.FC = ({ opacity: sensitiveShown ? 0 : 1 }} usePoster - resizeMode={ResizeMode.COVER} + resizeMode={videoResizeMode} {...(gifv ? { shouldPlay: true, @@ -113,12 +112,9 @@ const AttachmentVideo: React.FC = ({ })} useNativeControls={false} onFullscreenUpdate={async event => { - if ( - event.fullscreenUpdate === VideoFullscreenUpdate.PLAYER_DID_DISMISS - ) { - if (gifv) { - await videoPlayer.current?.pauseAsync() - } else { + if (event.fullscreenUpdate === VideoFullscreenUpdate.PLAYER_DID_DISMISS) { + Platform.OS === 'android' && setVideoResizeMode(ResizeMode.COVER) + if (!gifv) { await videoPlayer.current?.pauseAsync() } } @@ -156,10 +152,7 @@ const AttachmentVideo: React.FC = ({ loading={videoLoading} /> ) : null} - + ) diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index 25df7d5b..cfdbcbb7 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -9,18 +9,12 @@ export interface Props { mentions?: Mastodon.Status['mentions'] tags?: Mastodon.Status['tags'] } - numberOfLines?: number highlighted?: boolean disableDetails?: boolean } const TimelineContent = React.memo( - ({ - status, - numberOfLines, - highlighted = false, - disableDetails = false - }: Props) => { + ({ status, highlighted = false, disableDetails = false }: Props) => { const { t } = useTranslation('componentTimeline') const instanceAccount = useSelector(getInstanceAccount, () => true) @@ -46,9 +40,7 @@ const TimelineContent = React.memo( emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={ - instanceAccount.preferences['reading:expand:spoilers'] ? 999 : 1 - } + numberOfLines={instanceAccount.preferences['reading:expand:spoilers'] ? 999 : 1} expandHint={t('shared.content.expandHint')} highlighted={highlighted} disableDetails={disableDetails} @@ -62,7 +54,7 @@ const TimelineContent = React.memo( emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={highlighted ? 999 : numberOfLines} + numberOfLines={highlighted ? 999 : undefined} disableDetails={disableDetails} /> )} diff --git a/src/components/mediaSelector.ts b/src/components/mediaSelector.ts index 89404cd2..18ea1051 100644 --- a/src/components/mediaSelector.ts +++ b/src/components/mediaSelector.ts @@ -93,6 +93,7 @@ const mediaSelector = async ({ showActionSheetWithOptions( { title: i18next.t('componentMediaSelector:title'), + message: i18next.t('componentMediaSelector:message'), options: options(), cancelButtonIndex: mediaType ? 1 : 2 }, diff --git a/src/i18n/de/components/mediaSelector.json b/src/i18n/de/components/mediaSelector.json index 8789b337..87b949a1 100644 --- a/src/i18n/de/components/mediaSelector.json +++ b/src/i18n/de/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "Datenquelle auswählen", + "message": "", "options": { "image": "", "image_max": "", "video": "", "video_max": "" - }, - "library": { - "alert": { - "title": "Kein Zugriff", - "message": "Für den Upload ist eine Zugriffsgenehmigung erforderlich", - "buttons": { - "settings": "Einstellungen bestätigen" - } - } } } \ No newline at end of file diff --git a/src/i18n/en/components/mediaSelector.json b/src/i18n/en/components/mediaSelector.json index adc0fa47..090ea97c 100644 --- a/src/i18n/en/components/mediaSelector.json +++ b/src/i18n/en/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "Select media source", + "message": "Media EXIF data are not uploaded", "options": { "image": "Upload photos", "image_max": "Upload photos (max {{max}})", "video": "Upload video", "video_max": "Upload video (max {{max}})" - }, - "library": { - "alert": { - "title": "No permission", - "message": "Require photo library read permission to upload", - "buttons": { - "settings": "Update setting" - } - } } } \ No newline at end of file diff --git a/src/i18n/it/components/mediaSelector.json b/src/i18n/it/components/mediaSelector.json index 3816ac31..a91b2894 100644 --- a/src/i18n/it/components/mediaSelector.json +++ b/src/i18n/it/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "Seleziona origine media", + "message": "", "options": { "image": "Carica foto", "image_max": "Carica foto (massimo {{max}})", "video": "Carica video", "video_max": "Carica video (max {{max}})" - }, - "library": { - "alert": { - "title": "Permesso non concesso", - "message": "È richiesto l'accesso ai file del dispositivo per il caricamento dalla libreria", - "buttons": { - "settings": "Correggi impostazioni" - } - } } } \ No newline at end of file diff --git a/src/i18n/ja/components/mediaSelector.json b/src/i18n/ja/components/mediaSelector.json index d811edee..5fbbf341 100644 --- a/src/i18n/ja/components/mediaSelector.json +++ b/src/i18n/ja/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "メディアソースを選択", + "message": "", "options": { "image": "写真をアップロード", "image_max": "写真をアップロード (最大{{max}}枚)", "video": "動画をアップロード", "video_max": "動画をアップロード (最大{{max}}本)" - }, - "library": { - "alert": { - "title": "権限がありません", - "message": "アップロードするにはフォトライブラリの読み取り許可が必要です", - "buttons": { - "settings": "設定を更新する" - } - } } } \ No newline at end of file diff --git a/src/i18n/ko/components/mediaSelector.json b/src/i18n/ko/components/mediaSelector.json index 2d15ced1..d7beb132 100644 --- a/src/i18n/ko/components/mediaSelector.json +++ b/src/i18n/ko/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "미디어 소스 선택", + "message": "", "options": { "image": "", "image_max": "", "video": "", "video_max": "" - }, - "library": { - "alert": { - "title": "권한 없음", - "message": "업로드를 위해 사진 라이브러리 권한이 필요해요", - "buttons": { - "settings": "설정 업데이트" - } - } } } \ No newline at end of file diff --git a/src/i18n/pt_BR/components/mediaSelector.json b/src/i18n/pt_BR/components/mediaSelector.json index f100048b..62fa2f29 100644 --- a/src/i18n/pt_BR/components/mediaSelector.json +++ b/src/i18n/pt_BR/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "Selecionar fonte de mídia", + "message": "", "options": { "image": "Enviar fotos", "image_max": "Carregar fotos (máx. {{max}})", "video": "Enviar vídeo", "video_max": "Carregar vídeo (máx. {{max}})" - }, - "library": { - "alert": { - "title": "Sem permissão", - "message": "Exigir permissão de leitura da biblioteca de fotos para fazer upload", - "buttons": { - "settings": "Atualizar configurações" - } - } } } \ No newline at end of file diff --git a/src/i18n/vi/components/mediaSelector.json b/src/i18n/vi/components/mediaSelector.json index e06ffcbc..bd5a7e44 100644 --- a/src/i18n/vi/components/mediaSelector.json +++ b/src/i18n/vi/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "Chọn nguồn", + "message": "Chưa tải lên EXIF hình ảnh", "options": { "image": "Tải ảnh lên", "image_max": "Tải ảnh lên (tối đa {{max}})", "video": "Tải video lên", "video_max": "Tải video lên (tối đa {{max}})" - }, - "library": { - "alert": { - "title": "Chưa được cấp quyền", - "message": "Bạn cần cấp quyền đọc thư viện ảnh trước", - "buttons": { - "settings": "Cài đặt cập nhật" - } - } } } \ No newline at end of file diff --git a/src/i18n/zh-Hans/components/mediaSelector.json b/src/i18n/zh-Hans/components/mediaSelector.json index 039007b7..004a8b08 100644 --- a/src/i18n/zh-Hans/components/mediaSelector.json +++ b/src/i18n/zh-Hans/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "选择媒体", + "message": "媒体EXIF数据不被上传", "options": { "image": "上传图片", "image_max": "上传照片(上限 {{max}})", "video": "上传视频", "video_max": "上传视频(上限 {{max}})" - }, - "library": { - "alert": { - "title": "无权限", - "message": "需要读取相册权限才能上传附件", - "buttons": { - "settings": "去更新设置" - } - } } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/components/mediaSelector.json b/src/i18n/zh-Hant/components/mediaSelector.json index 1f0d0b96..ba000d9d 100644 --- a/src/i18n/zh-Hant/components/mediaSelector.json +++ b/src/i18n/zh-Hant/components/mediaSelector.json @@ -1,18 +1,10 @@ { "title": "選擇媒體來源", + "message": "", "options": { "image": "", "image_max": "", "video": "", "video_max": "" - }, - "library": { - "alert": { - "title": "權限不足", - "message": "上傳照片需要讀取的權限", - "buttons": { - "settings": "更新設定" - } - } } } \ No newline at end of file diff --git a/src/screens/ImageViewer/save.ts b/src/screens/ImageViewer/save.ts index 8388489c..6d605b89 100644 --- a/src/screens/ImageViewer/save.ts +++ b/src/screens/ImageViewer/save.ts @@ -1,6 +1,6 @@ import haptics from '@components/haptics' import { displayMessage } from '@components/Message' -import CameraRoll from '@react-native-community/cameraroll' +import { CameraRoll } from '@react-native-camera-roll/camera-roll' import { RootStackParamList } from '@utils/navigation/navigators' import { Theme } from '@utils/styles/themes' import * as FileSystem from 'expo-file-system' diff --git a/src/screens/Tabs/Local.tsx b/src/screens/Tabs/Local.tsx index c7ff98ae..7b30a1c6 100644 --- a/src/screens/Tabs/Local.tsx +++ b/src/screens/Tabs/Local.tsx @@ -9,6 +9,7 @@ import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import layoutAnimation from '@utils/styles/layoutAnimation' import React, { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' +import { Platform } from 'react-native' import ContextMenu from 'react-native-context-menu-view' import TabSharedRoot from './Shared/Root' @@ -33,7 +34,7 @@ const TabLocal = React.memo( headerTitle: () => ( { navigation.navigate('Tab-Me-Settings-Fontsize')} /> navigation.navigate('Tab-Me-Settings-Language')} + onPress={() => + Platform.OS === 'ios' + ? Linking.openSettings() + : navigation.navigate('Tab-Me-Settings-Language') + } />