diff --git a/src/state/queries/preferences/types.ts b/src/state/queries/preferences/types.ts index 2b04b725..ff742067 100644 --- a/src/state/queries/preferences/types.ts +++ b/src/state/queries/preferences/types.ts @@ -31,7 +31,7 @@ export type UsePreferencesQueryResponse = Omit< */ contentLabels: Record feedViewPrefs: BskyFeedViewPreference & { - lab_mergeFeedEnabled: boolean + lab_mergeFeedEnabled?: boolean } /** * User thread-view prefs, including newer fields that may not be typed yet. @@ -45,5 +45,5 @@ export type UsePreferencesQueryResponse = Omit< export type ThreadViewPreferences = Omit & { sort: 'oldest' | 'newest' | 'most-likes' | 'random' | string - lab_treeViewEnabled: boolean + lab_treeViewEnabled?: boolean } diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index b0e6f1a3..b5347fc8 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -296,7 +296,7 @@ function PostThreadLoaded({ post={item.post} record={item.record} dataUpdatedAt={dataUpdatedAt} - treeView={threadViewPrefs.lab_treeViewEnabled} + treeView={threadViewPrefs.lab_treeViewEnabled || false} depth={item.ctx.depth} isHighlightedPost={item.ctx.isHighlightedPost} hasMore={item.ctx.hasMore} diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index c297f865..8c80b0fd 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -48,7 +48,9 @@ export const HomeScreen = withAuthRequired( if (!preferences) return {} return { - mergeFeedEnabled: preferences.feedViewPrefs.lab_mergeFeedEnabled, + mergeFeedEnabled: Boolean( + preferences.feedViewPrefs.lab_mergeFeedEnabled, + ), mergeFeedSources: preferences.feeds.saved, } }, [preferences])