diff --git a/package.json b/package.json index 31e142ae..209e3464 100644 --- a/package.json +++ b/package.json @@ -68,12 +68,12 @@ "expo-updates": "0.13.1", "expo-video-thumbnails": "6.3.0", "expo-web-browser": "10.2.0", - "i18next": "21.8.4", + "i18next": "21.8.8", "li": "1.3.0", "lodash": "4.17.21", "react": "17.0.2", "react-dom": "17.0.2", - "react-i18next": "11.16.9", + "react-i18next": "11.17.0", "react-intl": "^6.0.3", "react-native": "0.68.2", "react-native-animated-spinkit": "1.5.2", @@ -93,7 +93,7 @@ "react-native-svg": "12.3.0", "react-native-swipe-list-view": "3.2.9", "react-native-tab-view": "3.1.1", - "react-query": "3.39.0", + "react-query": "3.39.1", "react-redux": "8.0.2", "redux-persist": "6.0.0", "rn-placeholder": "3.0.3", @@ -123,7 +123,7 @@ "patch-package": "6.4.7", "postinstall-postinstall": "2.1.0", "react-native-clean-project": "4.0.1", - "typescript": "4.7.2" + "typescript": "4.7.3" }, "resolutions": { "@types/react": "17.0.43", @@ -151,4 +151,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index d0344016..496f2c71 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -17,10 +17,9 @@ import { } from '@utils/slices/settingsSlice' import ThemeManager from '@utils/styles/ThemeManager' import 'expo-asset' -import * as Notifications from 'expo-notifications' import * as SplashScreen from 'expo-splash-screen' import React, { useCallback, useEffect, useState } from 'react' -import { AppState, LogBox, Platform } from 'react-native' +import { LogBox, Platform } from 'react-native' import { GestureHandlerRootView } from 'react-native-gesture-handler' import 'react-native-image-keyboard' import { enableFreeze } from 'react-native-screens' @@ -44,18 +43,6 @@ const App: React.FC = () => { log('log', 'App', 'rendering App') const [localCorrupt, setLocalCorrupt] = useState() - const appStateEffect = useCallback(() => { - Notifications.setBadgeCountAsync(0) - Notifications.dismissAllNotificationsAsync() - }, []) - useEffect(() => { - const appStateListener = AppState.addEventListener('change', appStateEffect) - - return () => { - appStateListener.remove() - } - }, []) - useEffect(() => { const delaySplash = async () => { log('log', 'App', 'delay splash') diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 579134b7..80049c5d 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -29,6 +29,7 @@ export interface Props { strokeWidth?: number size?: 'S' | 'M' | 'L' + fontBold?: boolean spacing?: 'XS' | 'S' | 'M' | 'L' round?: boolean overlay?: boolean @@ -48,6 +49,7 @@ const Button: React.FC = ({ disabled = false, strokeWidth, size = 'M', + fontBold = false, spacing = 'S', round = false, overlay = false, @@ -122,6 +124,7 @@ const Button: React.FC = ({ StyleConstants.Font.Size[size] * (size === 'L' ? 1.25 : 1), opacity: loading ? 0 : 1 }} + fontWeight={fontBold ? 'Bold' : 'Normal'} children={content} testID='text' /> diff --git a/src/components/Timeline/Shared/Attachment/AltText.tsx b/src/components/Timeline/Shared/Attachment/AltText.tsx new file mode 100644 index 00000000..59775ac5 --- /dev/null +++ b/src/components/Timeline/Shared/Attachment/AltText.tsx @@ -0,0 +1,38 @@ +import Button from '@components/Button' +import { useNavigation } from '@react-navigation/native' +import { StackNavigationProp } from '@react-navigation/stack' +import { RootStackParamList } from '@utils/navigation/navigators' +import { StyleConstants } from '@utils/styles/constants' + +export interface Props { + sensitiveShown: boolean + text?: string +} + +const AttachmentAltText: React.FC = ({ sensitiveShown, text }) => { + if (!text) { + return null + } + + const navigation = useNavigation>() + + return !sensitiveShown ? ( +