diff --git a/fastlane/Deliverfile b/fastlane/Deliverfile index 8a115902..079a7135 100644 --- a/fastlane/Deliverfile +++ b/fastlane/Deliverfile @@ -18,4 +18,5 @@ primary_category("SOCIAL_NETWORKING") automatic_release(false) force(true) precheck_include_in_app_purchases(false) -submit_for_review(true) \ No newline at end of file +submit_for_review(true) +overwrite_screenshots(true) \ No newline at end of file diff --git a/src/@types/react-navigation.d.ts b/src/@types/react-navigation.d.ts index acf59127..f90844f0 100644 --- a/src/@types/react-navigation.d.ts +++ b/src/@types/react-navigation.d.ts @@ -57,6 +57,7 @@ declare namespace Nav { 'Screen-ImagesViewer': { imageUrls: { id: Mastodon.Attachment['id'] + preview_url: Mastodon.AttachmentImage['preview_url'] url: Mastodon.AttachmentImage['url'] remote_url?: Mastodon.AttachmentImage['remote_url'] blurhash: Mastodon.AttachmentImage['blurhash'] diff --git a/src/components/GracefullyImage.tsx b/src/components/GracefullyImage.tsx index 37cac47f..62027dfb 100644 --- a/src/components/GracefullyImage.tsx +++ b/src/components/GracefullyImage.tsx @@ -67,8 +67,8 @@ const GracefullyImage = React.memo( setImageLoaded(true) setImageDimensions && setImageDimensions({ - width: nativeEvent.width, - height: nativeEvent.height + width: nativeEvent.source.width, + height: nativeEvent.source.height }) }, [source.uri] @@ -83,15 +83,20 @@ const GracefullyImage = React.memo( () => uri.preview && !imageLoaded ? ( ) : null, - [imageLoaded] + [] ) const originalView = useMemo( () => ( + ) } else { return ( ) } @@ -146,7 +158,7 @@ const GracefullyImage = React.memo( ) const styles = StyleSheet.create({ - blurhash: { + placeholder: { width: '100%', height: '100%', position: 'absolute' diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index ddbc8e7a..4d0589be 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -128,7 +128,8 @@ const renderNode = ({ }) }} > - {content || (showFullLink ? href : domain[1])} + {(content && content !== href && content) || + (showFullLink ? href : domain[1])} {!shouldBeTag ? ( { CameraRoll.save(image.url) - .then(() => haptics('Success')) + .then(() => { + haptics('Success') + }) .catch(() => { if (image.remote_url) { CameraRoll.save(image.remote_url) diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index ed4eded8..1d4e63de 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -11,15 +11,19 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context' import ImageViewer from './ImageViewer/Root' +import { saveAndroid, saveIos } from './ImageViewer/save' const saveImage = async ( image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] ) => { - const save = require('./ImageViewer/save') - Platform.select({ - ios: save.saveIos(image), - android: save.saveAndroid(image) - }) + switch (Platform.OS) { + case 'ios': + saveIos(image) + break + case 'android': + saveAndroid(image) + break + } } const HeaderComponent = React.memo( @@ -113,6 +117,7 @@ const ScreenImagesViewer = ({ navigation }: ScreenImagesViewerProp) => { if (imageUrls.length === 0) { + navigation.goBack() return null } diff --git a/src/screens/Tabs/Me/Settings/Tooot.tsx b/src/screens/Tabs/Me/Settings/Tooot.tsx index 35194f39..1315c1fe 100644 --- a/src/screens/Tabs/Me/Settings/Tooot.tsx +++ b/src/screens/Tabs/Me/Settings/Tooot.tsx @@ -2,7 +2,6 @@ import analytics from '@components/analytics' import Icon from '@components/Icon' import { MenuContainer, MenuRow } from '@components/Menu' import { useNavigation } from '@react-navigation/native' -import { useSearchQuery } from '@utils/queryHooks/search' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import * as Updates from 'expo-updates' @@ -20,11 +19,6 @@ const SettingsTooot: React.FC = () => { const { theme } = useTheme() const { t } = useTranslation('screenTabs') - const { isLoading, data } = useSearchQuery({ - term: '@tooot@xmflsct.com', - options: { enabled: instanceActive !== -1 } - }) - return ( { ) : null} { } iconBack='ChevronRight' onPress={() => { - const foundAccounts = data?.accounts.filter( - account => - account.acct === 'tooot@xmflsct.com' || - account.url === 'https://social.xmflsct.com/@tooot' - ) - if (foundAccounts?.length === 1) { + if (instanceActive !== -1) { navigation.navigate('Screen-Compose', { type: 'conversation', - accts: [foundAccounts[0].acct] + accts: ['tooot@xmflsct.com'] }) } else { WebBrowser.openBrowserAsync('https://social.xmflsct.com/@tooot') diff --git a/src/startup/audio.ts b/src/startup/audio.ts index cfe6e475..f92dc883 100644 --- a/src/startup/audio.ts +++ b/src/startup/audio.ts @@ -7,8 +7,7 @@ const audio = () => { playsInSilentModeIOS: true, interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX, interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX, - shouldDuckAndroid: true, - playThroughEarpieceAndroid: true + shouldDuckAndroid: true }) }