diff --git a/src/view/screens/AccessibilitySettings.tsx b/src/view/screens/AccessibilitySettings.tsx index 9ac97933..abe15507 100644 --- a/src/view/screens/AccessibilitySettings.tsx +++ b/src/view/screens/AccessibilitySettings.tsx @@ -36,7 +36,7 @@ export function AccessibilitySettingsScreen({}: Props) { const pal = usePalette('default') const setMinimalShellMode = useSetMinimalShellMode() const {screen} = useAnalytics() - const {isMobile} = useWebMediaQueries() + const {isMobile, isTabletOrMobile} = useWebMediaQueries() const {_} = useLingui() const requireAltTextEnabled = useRequireAltTextEnabled() @@ -58,7 +58,7 @@ export function AccessibilitySettingsScreen({}: Props) { return ( { @@ -41,26 +41,23 @@ export function PreferencesExternalEmbeds({}: Props) { return ( - - - - External Media Preferences - - - Customize media from external sites. - - - + contentContainerStyle={[pal.viewLight, {paddingBottom: 75}]}> + + + + External Media Preferences + + + Customize media from external sites. + + + + diff --git a/src/view/screens/PreferencesFollowingFeed.tsx b/src/view/screens/PreferencesFollowingFeed.tsx index b427a0f2..879c925f 100644 --- a/src/view/screens/PreferencesFollowingFeed.tsx +++ b/src/view/screens/PreferencesFollowingFeed.tsx @@ -1,24 +1,24 @@ import React, {useState} from 'react' -import {ScrollView, StyleSheet, TouchableOpacity, View} from 'react-native' +import {StyleSheet, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {Slider} from '@miblanchard/react-native-slider' import debounce from 'lodash.debounce' +import {usePalette} from '#/lib/hooks/usePalette' +import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' +import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import {colors, s} from '#/lib/styles' +import {isWeb} from '#/platform/detection' import { usePreferencesQuery, useSetFeedViewPreferencesMutation, } from '#/state/queries/preferences' -import {usePalette} from 'lib/hooks/usePalette' -import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' -import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types' -import {colors, s} from 'lib/styles' -import {isWeb} from 'platform/detection' -import {ToggleButton} from 'view/com/util/forms/ToggleButton' -import {ViewHeader} from 'view/com/util/ViewHeader' -import {CenteredView} from 'view/com/util/Views' -import {Text} from '../com/util/text/Text' +import {ToggleButton} from '#/view/com/util/forms/ToggleButton' +import {SimpleViewHeader} from '#/view/com/util/SimpleViewHeader' +import {Text} from '#/view/com/util/text/Text' +import {ScrollView} from '#/view/com/util/Views' function RepliesThresholdInput({ enabled, @@ -79,10 +79,10 @@ type Props = NativeStackScreenProps< CommonNavigatorParams, 'PreferencesFollowingFeed' > -export function PreferencesFollowingFeed({navigation}: Props) { +export function PreferencesFollowingFeed({}: Props) { const pal = usePalette('default') const {_} = useLingui() - const {isTabletOrDesktop} = useWebMediaQueries() + const {isTabletOrMobile} = useWebMediaQueries() const {data: preferences} = usePreferencesQuery() const {mutate: setFeedViewPref, variables} = useSetFeedViewPreferencesMutation() @@ -92,26 +92,25 @@ export function PreferencesFollowingFeed({navigation}: Props) { ) return ( - - - - - Fine-tune the content you see on your Following feed. - - - - + + + + + + Following Feed Preferences + + + + Fine-tune the content you see on your Following feed. + + + + @@ -253,7 +252,7 @@ export function PreferencesFollowingFeed({navigation}: Props) { - + {' '} Show Posts from My Feeds @@ -288,42 +287,17 @@ export function PreferencesFollowingFeed({navigation}: Props) { - - - { - navigation.canGoBack() - ? navigation.goBack() - : navigation.navigate('Settings') - }} - style={[styles.btn, isTabletOrDesktop && styles.btnDesktop]} - accessibilityRole="button" - accessibilityLabel={_(msg`Confirm`)} - accessibilityHint=""> - - Done - - - - + ) } const styles = StyleSheet.create({ container: { flex: 1, - paddingBottom: 90, }, desktopContainer: { borderLeftWidth: 1, borderRightWidth: 1, - paddingBottom: 40, }, titleSection: { paddingBottom: 30, @@ -338,6 +312,7 @@ const styles = StyleSheet.create({ }, cardsContainer: { paddingHorizontal: 20, + paddingVertical: 16, }, card: { padding: 16, diff --git a/src/view/screens/PreferencesThreads.tsx b/src/view/screens/PreferencesThreads.tsx index 321c6729..3b09f0ab 100644 --- a/src/view/screens/PreferencesThreads.tsx +++ b/src/view/screens/PreferencesThreads.tsx @@ -1,33 +1,29 @@ import React from 'react' -import { - ActivityIndicator, - ScrollView, - StyleSheet, - TouchableOpacity, - View, -} from 'react-native' +import {ActivityIndicator, StyleSheet, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {Text} from '../com/util/text/Text' -import {s, colors} from 'lib/styles' -import {usePalette} from 'lib/hooks/usePalette' -import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' -import {ToggleButton} from 'view/com/util/forms/ToggleButton' -import {RadioGroup} from 'view/com/util/forms/RadioGroup' -import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types' -import {ViewHeader} from 'view/com/util/ViewHeader' -import {CenteredView} from 'view/com/util/Views' -import {Trans, msg} from '@lingui/macro' +import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' + +import {usePalette} from '#/lib/hooks/usePalette' +import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' +import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import {colors, s} from '#/lib/styles' import { usePreferencesQuery, useSetThreadViewPreferencesMutation, } from '#/state/queries/preferences' +import {RadioGroup} from '#/view/com/util/forms/RadioGroup' +import {ToggleButton} from '#/view/com/util/forms/ToggleButton' +import {SimpleViewHeader} from '#/view/com/util/SimpleViewHeader' +import {Text} from '#/view/com/util/text/Text' +import {ScrollView} from '#/view/com/util/Views' +import {atoms as a} from '#/alf' type Props = NativeStackScreenProps -export function PreferencesThreads({navigation}: Props) { +export function PreferencesThreads({}: Props) { const pal = usePalette('default') const {_} = useLingui() - const {isTabletOrDesktop} = useWebMediaQueries() + const {isTabletOrMobile} = useWebMediaQueries() const {data: preferences} = usePreferencesQuery() const {mutate: setThreadViewPrefs, variables} = useSetThreadViewPreferencesMutation() @@ -42,27 +38,25 @@ export function PreferencesThreads({navigation}: Props) { ) return ( - - - - - Fine-tune the discussion threads. - - + + + + + + Thread Preferences + + + Fine-tune the discussion threads. + + + - {preferences ? ( - + {preferences ? ( @@ -136,46 +130,21 @@ export function PreferencesThreads({navigation}: Props) { /> - - ) : ( - - )} - - - { - navigation.canGoBack() - ? navigation.goBack() - : navigation.navigate('Settings') - }} - style={[styles.btn, isTabletOrDesktop && styles.btnDesktop]} - accessibilityRole="button" - accessibilityLabel={_(msg`Confirm`)} - accessibilityHint=""> - - Done - - - - + ) : ( + + )} + + ) } const styles = StyleSheet.create({ container: { flex: 1, - paddingBottom: 90, }, desktopContainer: { borderLeftWidth: 1, borderRightWidth: 1, - paddingBottom: 40, }, titleSection: { paddingBottom: 30, @@ -190,6 +159,7 @@ const styles = StyleSheet.create({ }, cardsContainer: { paddingHorizontal: 20, + paddingVertical: 16, }, card: { padding: 16,