about summary refs log tree commit diff
path: root/src/state/queries/preferences/const.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-12 13:31:11 -0600
committerGitHub <noreply@github.com>2023-11-12 11:31:11 -0800
commit05b728fffcdb17708fdb52685725faf7fdc545bc (patch)
treeb6523916d965f921d3f03d101dc60a7e74569bce /src/state/queries/preferences/const.ts
parentc8c308e31e63607280648e3e9f1f56a371adcd05 (diff)
downloadvoidsky-05b728fffcdb17708fdb52685725faf7fdc545bc.tar.zst
Eric/preferences (#1873)
* Add initial preferences query, couple mutations

* Remove unused

* Clean up labels, migrate getModerationOpts

* Add birth date handling

* Migrate feed prefs

* Migrate thread view prefs

* Migrate homeFeed to use existing key name

* Fix up saved feeds in response, no impl yet

* Migrate saved feeds to new hooks

* Clean up more of preferences

* Fix PreferencesThreads load state

* Fix modal dismissal

* Small spacing fix

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/queries/preferences/const.ts')
-rw-r--r--src/state/queries/preferences/const.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/state/queries/preferences/const.ts b/src/state/queries/preferences/const.ts
new file mode 100644
index 000000000..5db137e58
--- /dev/null
+++ b/src/state/queries/preferences/const.ts
@@ -0,0 +1,27 @@
+import {
+  UsePreferencesQueryResponse,
+  ThreadViewPreferences,
+} from '#/state/queries/preferences/types'
+
+export const DEFAULT_HOME_FEED_PREFS: UsePreferencesQueryResponse['feedViewPrefs'] =
+  {
+    hideReplies: false,
+    hideRepliesByUnfollowed: false,
+    hideRepliesByLikeCount: 0,
+    hideReposts: false,
+    hideQuotePosts: false,
+    lab_mergeFeedEnabled: false, // experimental
+  }
+
+export const DEFAULT_THREAD_VIEW_PREFS: ThreadViewPreferences = {
+  sort: 'newest',
+  prioritizeFollowedUsers: true,
+  lab_treeViewEnabled: false,
+}
+
+const DEFAULT_PROD_FEED_PREFIX = (rkey: string) =>
+  `at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}`
+export const DEFAULT_PROD_FEEDS = {
+  pinned: [DEFAULT_PROD_FEED_PREFIX('whats-hot')],
+  saved: [DEFAULT_PROD_FEED_PREFIX('whats-hot')],
+}