From f3c40e948693f098d09c02e912cb90b4d9fca46e Mon Sep 17 00:00:00 2001 From: xmflsct Date: Fri, 23 Dec 2022 18:19:14 +0100 Subject: [PATCH] Fix #611 --- fastlane/metadata/en-US/release_notes.txt | 1 + fastlane/metadata/zh-Hans/release_notes.txt | 1 + .../Timeline/Shared/Attachment/Video.tsx | 24 +++++++++++-- src/i18n/en/screens/compose.json | 3 +- src/i18n/en/screens/tabs.json | 36 +++---------------- src/screens/Compose/Root/Header/TextInput.tsx | 8 ++--- src/screens/Tabs/Me/Settings/App.tsx | 21 +++++------ src/screens/Tabs/Me/SettingsFontsize.tsx | 5 +-- src/screens/Tabs/Notifications/Filters.tsx | 4 +-- .../Tabs/Shared/Account/Information/Stats.tsx | 4 +-- src/store.ts | 6 ++-- src/utils/migrations/settings/migration.ts | 7 ++++ src/utils/migrations/settings/v4.ts | 8 +++++ src/utils/slices/settingsSlice.ts | 28 +++++++-------- src/utils/styles/ThemeManager.tsx | 35 +++++------------- 15 files changed, 88 insertions(+), 103 deletions(-) create mode 100644 src/utils/migrations/settings/v4.ts diff --git a/fastlane/metadata/en-US/release_notes.txt b/fastlane/metadata/en-US/release_notes.txt index 568f648b..4fe3f481 100644 --- a/fastlane/metadata/en-US/release_notes.txt +++ b/fastlane/metadata/en-US/release_notes.txt @@ -1,2 +1,3 @@ Enjoy toooting! This version includes following improvements and fixes: - Allowing adding more context of reports +- Option to disable autoplay gif diff --git a/fastlane/metadata/zh-Hans/release_notes.txt b/fastlane/metadata/zh-Hans/release_notes.txt index 1f213bc2..6790fea0 100644 --- a/fastlane/metadata/zh-Hans/release_notes.txt +++ b/fastlane/metadata/zh-Hans/release_notes.txt @@ -1,2 +1,3 @@ toooting愉快!此版本包括以下改进和修复: - 可添加举报细节 +- 新增暂停自动播放gif动画选项 \ No newline at end of file diff --git a/src/components/Timeline/Shared/Attachment/Video.tsx b/src/components/Timeline/Shared/Attachment/Video.tsx index 78e53ac4..e510ab73 100644 --- a/src/components/Timeline/Shared/Attachment/Video.tsx +++ b/src/components/Timeline/Shared/Attachment/Video.tsx @@ -8,6 +8,8 @@ import AttachmentAltText from './AltText' import { Platform } from 'expo-modules-core' import { useAccessibility } from '@utils/accessibility/AccessibilityManager' import { aspectRatio } from './dimensions' +import { useSelector } from 'react-redux' +import { getSettingsAutoplayGifv } from '@utils/slices/settingsSlice' export interface Props { total: number @@ -25,6 +27,7 @@ const AttachmentVideo: React.FC = ({ gifv = false }) => { const { reduceMotionEnabled } = useAccessibility() + const autoplayGifv = useSelector(getSettingsAutoplayGifv) const videoPlayer = useRef