diff --git a/app.config.ts b/app.config.ts index 6a93b58a..c0114653 100644 --- a/app.config.ts +++ b/app.config.ts @@ -37,6 +37,7 @@ export default (): ExpoConfig => ({ android: { package: 'com.xmflsct.app.tooot', googleServicesFile: './configs/google-services.json', - permissions: ['CAMERA', 'VIBRATE'] + permissions: ['CAMERA', 'VIBRATE'], + blockedPermissions: ['USE_BIOMETRIC', 'USE_FINGERPRINT'] } }) diff --git a/src/components/Timeline/Shared/Attachment/Video.tsx b/src/components/Timeline/Shared/Attachment/Video.tsx index a51c4c67..22d04903 100644 --- a/src/components/Timeline/Shared/Attachment/Video.tsx +++ b/src/components/Timeline/Shared/Attachment/Video.tsx @@ -1,6 +1,6 @@ import Button from '@components/Button' import { StyleConstants } from '@utils/styles/constants' -import { Video } from 'expo-av' +import { ResizeMode, Video, VideoFullscreenUpdate } from 'expo-av' import React, { useCallback, useEffect, useRef, useState } from 'react' import { AppState, @@ -110,15 +110,14 @@ const AttachmentVideo: React.FC = ({ source: { uri: video.url } } : { - resizeMode: 'cover', + resizeMode: ResizeMode.COVER, posterSource: { uri: video.preview_url }, - posterStyle: { resizeMode: 'cover' } + posterStyle: { resizeMode: ResizeMode.COVER } })} useNativeControls={false} onFullscreenUpdate={async event => { if ( - event.fullscreenUpdate === - Video.FULLSCREEN_UPDATE_PLAYER_DID_DISMISS + event.fullscreenUpdate === VideoFullscreenUpdate.PLAYER_DID_DISMISS ) { if (gifv) { await videoPlayer.current?.pauseAsync() diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index 6648d1c2..1bab66a1 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' export interface Props { - status: Pick< - Mastodon.Status, - 'content' | 'spoiler_text' | 'emojis' | 'mentions' | 'tags' - > + status: Pick & { + mentions?: Mastodon.Status['mentions'] + tags?: Mastodon.Status['tags'] + } numberOfLines?: number highlighted?: boolean disableDetails?: boolean diff --git a/src/components/Timeline/Shared/HeaderShared/Created.tsx b/src/components/Timeline/Shared/HeaderShared/Created.tsx index cd8eff38..7d18474b 100644 --- a/src/components/Timeline/Shared/HeaderShared/Created.tsx +++ b/src/components/Timeline/Shared/HeaderShared/Created.tsx @@ -9,11 +9,11 @@ import { FormattedDate, FormattedRelativeTime, FormattedTime } from 'react-intl' export interface Props { created_at: Mastodon.Status['created_at'] | number edited_at?: Mastodon.Status['edited_at'] - highlighted: boolean + highlighted?: boolean } const HeaderSharedCreated = React.memo( - ({ created_at, edited_at, highlighted }: Props) => { + ({ created_at, edited_at, highlighted = false }: Props) => { const { t } = useTranslation('componentTimeline') const { colors } = useTheme() diff --git a/src/components/Timeline/Shared/Poll.tsx b/src/components/Timeline/Shared/Poll.tsx index 4e6b3582..b4c6a91f 100644 --- a/src/components/Timeline/Shared/Poll.tsx +++ b/src/components/Timeline/Shared/Poll.tsx @@ -4,7 +4,6 @@ import haptics from '@components/haptics' import Icon from '@components/Icon' import { displayMessage } from '@components/Message' import { ParseEmojis } from '@components/Parse' -import RelativeTime from '@components/RelativeTime' import CustomText from '@components/Text' import { MutationVarsTimelineUpdateStatusProperty, diff --git a/src/components/mediaSelector.ts b/src/components/mediaSelector.ts index 4a5af36b..50ad1adc 100644 --- a/src/components/mediaSelector.ts +++ b/src/components/mediaSelector.ts @@ -2,7 +2,10 @@ import analytics from '@components/analytics' import { ActionSheetOptions } from '@expo/react-native-action-sheet' import * as ImageManipulator from 'expo-image-manipulator' import * as ImagePicker from 'expo-image-picker' -import { ImageInfo } from 'expo-image-picker/build/ImagePicker.types' +import { + ImageInfo, + UIImagePickerPresentationStyle +} from 'expo-image-picker/build/ImagePicker.types' import i18next from 'i18next' import { Alert, Linking, Platform } from 'react-native' @@ -39,7 +42,7 @@ const mediaSelector = async ({ { resize } ]) } - resolve(newResult) + resolve({ ...newResult, cancelled: false }) } else { resolve(result) } @@ -94,8 +97,8 @@ const mediaSelector = async ({ exif: false, presentationStyle: Platform.OS === 'ios' && parseInt(Platform.Version) < 13 - ? 0 - : -2 + ? UIImagePickerPresentationStyle.FULL_SCREEN + : UIImagePickerPresentationStyle.AUTOMATIC }) if (!result.cancelled) { diff --git a/src/components/openLink.ts b/src/components/openLink.ts index 7474ba3c..3e0aff73 100644 --- a/src/components/openLink.ts +++ b/src/components/openLink.ts @@ -34,6 +34,7 @@ const openLink = async (url: string, navigation?: any) => { // @ts-ignore navigation.push(page, options) } else { + // @ts-ignore navigationRef.navigate(page, options) } } diff --git a/src/i18n/de/components/timeline.json b/src/i18n/de/components/timeline.json index a0926f41..78ce6de8 100644 --- a/src/i18n/de/components/timeline.json +++ b/src/i18n/de/components/timeline.json @@ -62,8 +62,8 @@ "history": { "accessibilityLabel": "Dieser Tröt wurde {{count}} mal bearbeitet", "accessibilityHint": "Für den vollständigen Verlauf auswählen", - "text": "{{count}} bearbeitet", - "text_plural": "{{count}} mal bearbeitet" + "text_one": "{{count}} bearbeitet", + "text_other": "{{count}} mal bearbeitet" } }, "attachment": { @@ -219,10 +219,10 @@ "refresh": "Aktualisieren" }, "count": { - "voters": "{{count}} Benutzer haben abgestimmt", - "voters_plural": "{{count}} Benutzer haben abgestimmt", - "votes": "{{count}} Stimmen", - "votes_plural": "{{count}} Stimmen" + "voters_one": "{{count}} Benutzer haben abgestimmt", + "voters_other": "{{count}} Benutzer haben abgestimmt", + "votes_one": "{{count}} Stimmen", + "votes_other": "{{count}} Stimmen" }, "expiration": { "expired": "Abstimmung abgelaufen", diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index 56ee01ae..a06addd8 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -62,8 +62,8 @@ "history": { "accessibilityLabel": "This toot has been edited {{count}} times", "accessibilityHint": "Tap to view the full edit history", - "text": "{{count}} edit", - "text_plural": "{{count}} edits" + "text_one": "{{count}} edit", + "text_other": "{{count}} edits" } }, "attachment": { @@ -219,10 +219,10 @@ "refresh": "Refresh" }, "count": { - "voters": "{{count}} user voted", - "voters_plural": "{{count}} users voted", - "votes": "{{count}} vote", - "votes_plural": "{{count}} votes" + "voters_one": "{{count}} user voted", + "voters_other": "{{count}} users voted", + "votes_one": "{{count}} vote", + "votes_other": "{{count}} votes" }, "expiration": { "expired": "Vote expired", diff --git a/src/i18n/en/screens/compose.json b/src/i18n/en/screens/compose.json index 10bae903..0006bed2 100644 --- a/src/i18n/en/screens/compose.json +++ b/src/i18n/en/screens/compose.json @@ -142,8 +142,8 @@ "accessibilityHint": "Open emoji selection panel, swipe horizontally to change page" } }, - "drafts": "Draft ({{count}})", - "drafts_plural": "Drafts ({{count}})" + "drafts_one": "Draft ({{count}})", + "drafts_other": "Drafts ({{count}})" }, "editAttachment": { "header": { diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index dbc17037..e5efbcd6 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -116,8 +116,8 @@ }, "fields": { "title": "Metadata", - "total": "{{count}} field", - "total_plural": "{{count}} fields" + "total_one": "{{count}} field", + "total_other": "{{count}} fields" }, "visibility": { "title": "Posting Visibility", diff --git a/src/i18n/ko/components/timeline.json b/src/i18n/ko/components/timeline.json index 4a0d1729..5106e5ff 100644 --- a/src/i18n/ko/components/timeline.json +++ b/src/i18n/ko/components/timeline.json @@ -196,10 +196,10 @@ "refresh": "새로고침" }, "count": { - "voters": "{{count}}명의 사용자가 투표", - "voters_plural": "{{count}}명의 사용자가 투표", - "votes": "{{count}} 투표", - "votes_plural": "{{count}} 투표" + "voters_one": "{{count}}명의 사용자가 투표", + "voters_other": "{{count}}명의 사용자가 투표", + "votes_one": "{{count}} 투표", + "votes_other": "{{count}} 투표" }, "expiration": { "expired": "투표 종료됨", diff --git a/src/i18n/ko/screens/compose.json b/src/i18n/ko/screens/compose.json index 6ab71fd6..50acee3a 100644 --- a/src/i18n/ko/screens/compose.json +++ b/src/i18n/ko/screens/compose.json @@ -134,8 +134,8 @@ "accessibilityHint": "이모지 선택 패널 열기, 가로로 스와이프해서 페이지를 바꿀 수 있어요" } }, - "drafts": "초안 ({{count}})", - "drafts_plural": "초안 ({{count}})" + "drafts_one": "초안 ({{count}})", + "drafts_other": "초안 ({{count}})" }, "editAttachment": { "header": { diff --git a/src/i18n/ko/screens/tabs.json b/src/i18n/ko/screens/tabs.json index d7f6ef59..f1b89e16 100644 --- a/src/i18n/ko/screens/tabs.json +++ b/src/i18n/ko/screens/tabs.json @@ -113,8 +113,8 @@ }, "fields": { "title": "메타데이터", - "total": "{{count}}개 필드", - "total_plural": "{{count}}개 필드" + "total_one": "{{count}}개 필드", + "total_other": "{{count}}개 필드" }, "visibility": { "title": "공개 범위", diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index 2b2586b2..a928f516 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -198,10 +198,10 @@ "refresh": "Làm mới" }, "count": { - "voters": "{{count}} người bình chọn", - "voters_plural": "{{count}} người bình chọn", - "votes": "{{count}} bình chọn", - "votes_plural": "{{count}} bình chọn" + "voters_one": "{{count}} người bình chọn", + "voters_other": "{{count}} người bình chọn", + "votes_one": "{{count}} bình chọn", + "votes_other": "{{count}} bình chọn" }, "expiration": { "expired": "Đã kết thúc", diff --git a/src/i18n/vi/screens/compose.json b/src/i18n/vi/screens/compose.json index c5473438..9a1ee998 100644 --- a/src/i18n/vi/screens/compose.json +++ b/src/i18n/vi/screens/compose.json @@ -134,8 +134,8 @@ "accessibilityHint": "Mở bảng chọn emoji, vuốt qua lại để xem toàn bộ" } }, - "drafts": "Nháp ({{count}})", - "drafts_plural": "Nháp ({{count}})" + "drafts_one": "Nháp ({{count}})", + "drafts_other": "Nháp ({{count}})" }, "editAttachment": { "header": { diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index de4365ae..6d7cd7ae 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -116,8 +116,8 @@ }, "fields": { "title": "Metadata", - "total": "{{count}} mục", - "total_plural": "{{count}} mục" + "total_one": "{{count}} mục", + "total_other": "{{count}} mục" }, "visibility": { "title": "Kiểu tút mặc định", diff --git a/src/i18n/zh-Hans/components/timeline.json b/src/i18n/zh-Hans/components/timeline.json index d39a21c3..a08dec1f 100644 --- a/src/i18n/zh-Hans/components/timeline.json +++ b/src/i18n/zh-Hans/components/timeline.json @@ -198,10 +198,10 @@ "refresh": "刷新" }, "count": { - "voters": "已投{{count}}人", - "voters_plural": "已投{{count}}人", - "votes": "{{count}}票", - "votes_plural": "{{count}}票" + "voters_one": "已投{{count}}人", + "voters_other": "已投{{count}}人", + "votes_one": "{{count}}票", + "votes_other": "{{count}}票" }, "expiration": { "expired": "投票已结束", @@ -210,4 +210,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/i18n/zh-Hans/screens/compose.json b/src/i18n/zh-Hans/screens/compose.json index 356acb50..5ea7aa77 100644 --- a/src/i18n/zh-Hans/screens/compose.json +++ b/src/i18n/zh-Hans/screens/compose.json @@ -136,8 +136,8 @@ "accessibilityHint": "打开表情选择面板,水平滑动切换页面" } }, - "drafts": "草稿 ({{count}})", - "drafts_plural": "草稿 ({{count}})" + "drafts_one": "草稿 ({{count}})", + "drafts_other": "草稿 ({{count}})" }, "editAttachment": { "header": { diff --git a/src/i18n/zh-Hans/screens/tabs.json b/src/i18n/zh-Hans/screens/tabs.json index e1f34f93..98e26cd7 100644 --- a/src/i18n/zh-Hans/screens/tabs.json +++ b/src/i18n/zh-Hans/screens/tabs.json @@ -116,8 +116,8 @@ }, "fields": { "title": "附加信息", - "total": "{{count}} 项", - "total_plural": "{{count}} 项" + "total_one": "{{count}} 项", + "total_other": "{{count}} 项" }, "visibility": { "title": "嘟文默认可见范围", diff --git a/src/screens/Announcements.tsx b/src/screens/Announcements.tsx index b00c12f3..3cb895fb 100644 --- a/src/screens/Announcements.tsx +++ b/src/screens/Announcements.tsx @@ -2,7 +2,6 @@ import analytics from '@components/analytics' import Button from '@components/Button' import haptics from '@components/haptics' import { ParseHTML } from '@components/Parse' -import RelativeTime from '@components/RelativeTime' import CustomText from '@components/Text' import { BlurView } from '@react-native-community/blur' import { useAccessibility } from '@utils/accessibility/AccessibilityManager' diff --git a/src/screens/ImageViewer/components/ImageItem.android.tsx b/src/screens/ImageViewer/components/ImageItem.android.tsx index 3974861b..93473e02 100644 --- a/src/screens/ImageViewer/components/ImageItem.android.tsx +++ b/src/screens/ImageViewer/components/ImageItem.android.tsx @@ -7,6 +7,7 @@ */ import GracefullyImage from '@components/GracefullyImage' +import { RootStackParamList } from '@utils/navigation/navigators' import React, { useState, useCallback } from 'react' import { Animated, Dimensions, StyleSheet } from 'react-native' import usePanResponder from '../hooks/usePanResponder' @@ -17,11 +18,11 @@ const SCREEN_WIDTH = SCREEN.width const SCREEN_HEIGHT = SCREEN.height type Props = { - imageSrc: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] + imageSrc: RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] onRequestClose: () => void onZoom: (isZoomed: boolean) => void onLongPress: ( - image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] + image: RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] ) => void delayLongPress: number swipeToCloseEnabled?: boolean diff --git a/src/screens/ImageViewer/components/ImageItem.ios.tsx b/src/screens/ImageViewer/components/ImageItem.ios.tsx index edced941..25932987 100644 --- a/src/screens/ImageViewer/components/ImageItem.ios.tsx +++ b/src/screens/ImageViewer/components/ImageItem.ios.tsx @@ -7,6 +7,7 @@ */ import GracefullyImage from '@components/GracefullyImage' +import { RootStackParamList } from '@utils/navigation/navigators' import React, { createRef, useCallback, useRef, useState } from 'react' import { Animated, @@ -31,11 +32,11 @@ const SCREEN_WIDTH = SCREEN.width const SCREEN_HEIGHT = SCREEN.height type Props = { - imageSrc: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] + imageSrc: RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] onRequestClose: () => void onZoom: (scaled: boolean) => void onLongPress: ( - image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] + image: RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] ) => void swipeToCloseEnabled?: boolean }