From bb91adb729a086e2deb50058490d0eb925e1c9cb Mon Sep 17 00:00:00 2001 From: "xan.lol" Date: Mon, 17 Aug 2026 04:01:29 -0700 Subject: [PATCH] remove density settings page - keeping compact account switcher on 6-7 accs - call AppView an app server in badge settings - use pds agent for verification badegs toggle - compact post toggle replaces screen link now --- src/Navigation.tsx | 9 -- src/lib/routes/types.ts | 1 - src/routes.ts | 1 - .../RunesSettings/DensitySettings.tsx | 82 ------------------- .../RunesSettings/DisplaySettings.tsx | 58 ++++--------- src/state/queries/preferences/index.ts | 2 +- 6 files changed, 18 insertions(+), 135 deletions(-) delete mode 100644 src/screens/Settings/RunesSettings/DensitySettings.tsx diff --git a/src/Navigation.tsx b/src/Navigation.tsx index d11175fdc..960489ba8 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -250,10 +250,6 @@ const RunesBadgesSettingsScreen = deferredNamedScreen( () => require('#/screens/Settings/RunesSettings/BadgesSettings'), 'RunesBadgesSettingsScreen', ) -const RunesDisplayDensitySettingsScreen = deferredNamedScreen( - () => require('#/screens/Settings/RunesSettings/DensitySettings'), - 'RunesDisplayDensitySettingsScreen', -) const RunesDisplaySettingsScreen = deferredNamedScreen( () => require('#/screens/Settings/RunesSettings/DisplaySettings'), 'RunesDisplaySettingsScreen', @@ -652,11 +648,6 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { getComponent={() => RunesDisplayAlsoLikedSettingsScreen} options={{title: title(msg`Also liked`), requireAuth: true}} /> - RunesDisplayDensitySettingsScreen} - options={{title: title(msg`Density`), requireAuth: true}} - /> RunesInfrastructureSettingsScreen} diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts index 67cf6f00b..028a5e1e9 100644 --- a/src/lib/routes/types.ts +++ b/src/lib/routes/types.ts @@ -76,7 +76,6 @@ export type CommonNavigatorParams = { RunesUsabilityProfileSettings: undefined RunesDisplaySettings: undefined RunesDisplayAlsoLikedSettings: undefined - RunesDisplayDensitySettings: undefined RunesInfrastructureSettings: undefined RunesExtraSettings: undefined RunesExtraFeatureGatesSettings: undefined diff --git a/src/routes.ts b/src/routes.ts index 57428d754..97633c002 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -60,7 +60,6 @@ export const router = new Router({ RunesUsabilityProfileSettings: '/settings/runes/usability/profiles', RunesDisplaySettings: '/settings/runes/display', RunesDisplayAlsoLikedSettings: '/settings/runes/display/also-liked', - RunesDisplayDensitySettings: '/settings/runes/display/density', RunesInfrastructureSettings: '/settings/runes/infrastructure', RunesExtraSettings: '/settings/runes/extra', RunesExtraFeatureGatesSettings: '/settings/runes/extra/feature-gates', diff --git a/src/screens/Settings/RunesSettings/DensitySettings.tsx b/src/screens/Settings/RunesSettings/DensitySettings.tsx deleted file mode 100644 index 08bfec785..000000000 --- a/src/screens/Settings/RunesSettings/DensitySettings.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import {Trans, useLingui} from '@lingui/react/macro' - -import {useCompactPosts, useSetCompactPosts} from '#/state/preferences' -import { - useAutoCompactAccountSwitcher, - useSetAutoCompactAccountSwitcher, -} from '#/state/preferences/auto-compact-account-switcher' -import { - useCompactAccountSwitcher, - useSetCompactAccountSwitcher, -} from '#/state/preferences/compact-account-switcher' -import * as SettingsList from '#/screens/Settings/components/SettingsList' -import {atoms as a} from '#/alf' -import * as Toggle from '#/components/forms/Toggle' -import {PersonGroup_Stroke2_Corner2_Rounded as PersonGroupIcon} from '#/components/icons/Person' -import {UFO_Stroke2_Corner0_Rounded as UfoIcon} from '#/components/icons/UFO' -import {RunesScreenLayout} from './components/RunesScreenLayout' - -export function RunesDisplayDensitySettingsScreen() { - const {t: l} = useLingui() - - const compactPosts = useCompactPosts() - const setCompactPosts = useSetCompactPosts() - - const compactAccountSwitcher = useCompactAccountSwitcher() - const setCompactAccountSwitcher = useSetCompactAccountSwitcher() - - const autoCompactAccountSwitcher = useAutoCompactAccountSwitcher() - const setAutoCompactAccountSwitcher = useSetAutoCompactAccountSwitcher() - - return ( - - - - - Account switcher - - setCompactAccountSwitcher(value)} - style={[a.w_full]}> - - Use compact account switcher - - - - setAutoCompactAccountSwitcher(value)} - style={[a.w_full]}> - - - Automatically use compact switcher with more than 6 accounts - - - - - - - - - Anything else - - setCompactPosts(value)} - style={[a.w_full]}> - - Compact posts - - - - - - ) -} diff --git a/src/screens/Settings/RunesSettings/DisplaySettings.tsx b/src/screens/Settings/RunesSettings/DisplaySettings.tsx index a978c0dce..a8d3b6e5d 100644 --- a/src/screens/Settings/RunesSettings/DisplaySettings.tsx +++ b/src/screens/Settings/RunesSettings/DisplaySettings.tsx @@ -11,9 +11,8 @@ import { useAlsoLikedCollapseByDefault, useAlsoLikedFeedEnabled, useCompactPosts, + useSetCompactPosts, } from '#/state/preferences' -import {useAutoCompactAccountSwitcher} from '#/state/preferences/auto-compact-account-switcher' -import {useCompactAccountSwitcher} from '#/state/preferences/compact-account-switcher' import { useDownloadFormat, useSetDownloadFormat, @@ -51,7 +50,7 @@ import {Celebrate_Stroke2_Corner0_Rounded as CelebrateIcon} from '#/components/i import {Heart2_Stroke2_Corner0_Rounded as HeartIcon} from '#/components/icons/Heart2' import {Image_Stroke2_Corner0_Rounded as ImageIcon} from '#/components/icons/Image' import {Pencil_Stroke2_Corner0_Rounded as PencilIcon} from '#/components/icons/Pencil' -import {PersonGroup_Stroke2_Corner2_Rounded as PersonGroupIcon} from '#/components/icons/Person' +import {UFO_Stroke2_Corner0_Rounded as UfoIcon} from '#/components/icons/UFO' import {Window_Stroke2_Corner2_Rounded as WindowIcon} from '#/components/icons/Window' import * as Select from '#/components/Select' import {Text} from '#/components/Typography' @@ -64,6 +63,8 @@ export function RunesDisplaySettingsScreen() { const alsoLikedFeedEnabled = useAlsoLikedFeedEnabled() const alsoLikedCollapseByDefault = useAlsoLikedCollapseByDefault() + const compactPosts = useCompactPosts() + const setCompactPosts = useSetCompactPosts() const showViaClient = useShowViaClient() const setShowViaClient = useSetShowViaClient() @@ -99,16 +100,19 @@ export function RunesDisplaySettingsScreen() { } /> - - - Density} - subtitleText={} - /> - + setCompactPosts(value)}> + + + + Compact posts + + + + Shown in thread views, expanded by default } -function DensityDeclaration() { - const compactPosts = useCompactPosts() - const compactAccountSwitcher = useCompactAccountSwitcher() - const autoCompactAccountSwitcher = useAutoCompactAccountSwitcher() - - if (compactAccountSwitcher && compactPosts) { - return Always on compact switcher, compact posts - } - - if (autoCompactAccountSwitcher && compactPosts) { - return Auto-compact switcher, compact posts - } - - if (compactPosts) { - return Compact posts on - } - - if (compactAccountSwitcher) { - return Compact always on - } - - if (autoCompactAccountSwitcher) { - return Auto-compact switcher with 7+ accounts - } - - return Default layout only -} - function PostReplacementDialog({ control, }: { diff --git a/src/state/queries/preferences/index.ts b/src/state/queries/preferences/index.ts index cf72e8517..b032fde76 100644 --- a/src/state/queries/preferences/index.ts +++ b/src/state/queries/preferences/index.ts @@ -469,7 +469,7 @@ export function useSetVerificationPrefsMutation() { return useMutation({ mutationFn: async prefs => { - await agent.setVerificationPrefs(prefs) + await pdsAgent(agent).setVerificationPrefs(prefs) if (prefs.hideBadges) { ax.metric('verification:settings:hideBadges', {}) } else { -- 2.51.2