diff options
Diffstat (limited to 'src/state/queries')
-rw-r--r-- | src/state/queries/explore-feed-previews.tsx | 33 | ||||
-rw-r--r-- | src/state/queries/notifications/settings.ts | 5 | ||||
-rw-r--r-- | src/state/queries/notifications/unread.tsx | 10 | ||||
-rw-r--r-- | src/state/queries/usePostThread/index.ts | 4 | ||||
-rw-r--r-- | src/state/queries/usePostThread/traversal.ts | 2 |
5 files changed, 21 insertions, 33 deletions
diff --git a/src/state/queries/explore-feed-previews.tsx b/src/state/queries/explore-feed-previews.tsx index 45bfc5c48..f02adde79 100644 --- a/src/state/queries/explore-feed-previews.tsx +++ b/src/state/queries/explore-feed-previews.tsx @@ -36,38 +36,27 @@ const RQKEY = (feeds: string[]) => [RQKEY_ROOT, feeds] const LIMIT = 8 // sliced to 6, overfetch to account for moderation const PINNED_POST_URIS: Record<string, boolean> = { // 📰 News - 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': - true, + 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': true, // Gardening - 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': - true, + 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': true, // Web Development Trending - 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': - true, + 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': true, // Anime & Manga EN - 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': - true, + 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': true, // 📽️ Film - 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': - true, + 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': true, // PopSky - 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': - true, + 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': true, // Science - 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': - true, + 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': true, // Birds! 🦉 - 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': - true, + 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': true, // Astronomy - 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': - true, + 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': true, // What's Cooking 🍽️ - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': - true, + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': true, // BookSky 💙📚 #booksky - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': - true, + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': true, } export type FeedPreviewItem = diff --git a/src/state/queries/notifications/settings.ts b/src/state/queries/notifications/settings.ts index 986d0b01d..02c0fe23b 100644 --- a/src/state/queries/notifications/settings.ts +++ b/src/state/queries/notifications/settings.ts @@ -36,9 +36,8 @@ export function useNotificationSettingsUpdateMutation() { mutationFn: async ( update: Partial<AppBskyNotificationDefs.Preferences>, ) => { - const response = await agent.app.bsky.notification.putPreferencesV2( - update, - ) + const response = + await agent.app.bsky.notification.putPreferencesV2(update) return response.data.preferences }, onMutate: update => { diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index ba2377a78..da8d68126 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -14,7 +14,7 @@ import {useAgent, useSession} from '#/state/session' import {useModerationOpts} from '../../preferences/moderation-opts' import {truncateAndInvalidate} from '../util' import {RQKEY as RQKEY_NOTIFS} from './feed' -import {CachedFeedPage, FeedPage} from './types' +import {type CachedFeedPage, type FeedPage} from './types' import {fetchPage} from './util' const UPDATE_INTERVAL = 30 * 1e3 // 30sec @@ -94,8 +94,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) { data.event === '30+' ? 30 : data.event === '' - ? 0 - : parseInt(data.event, 10) || 1, + ? 0 + : parseInt(data.event, 10) || 1, } setNumUnread(data.event) } @@ -164,8 +164,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) { unreadCount >= 30 ? '30+' : unreadCount === 0 - ? '' - : String(unreadCount) + ? '' + : String(unreadCount) // track last sync const now = new Date() diff --git a/src/state/queries/usePostThread/index.ts b/src/state/queries/usePostThread/index.ts index 782888cfb..8495df04c 100644 --- a/src/state/queries/usePostThread/index.ts +++ b/src/state/queries/usePostThread/index.ts @@ -52,8 +52,8 @@ export function usePostThread({anchor}: {anchor?: string}) { return view === 'linear' ? LINEAR_VIEW_BELOW : isWeb && gtPhone - ? TREE_VIEW_BELOW_DESKTOP - : TREE_VIEW_BELOW + ? TREE_VIEW_BELOW_DESKTOP + : TREE_VIEW_BELOW }, [view, gtPhone]) const postThreadQueryKey = createPostThreadQueryKey({ diff --git a/src/state/queries/usePostThread/traversal.ts b/src/state/queries/usePostThread/traversal.ts index 124591125..7d8cd6464 100644 --- a/src/state/queries/usePostThread/traversal.ts +++ b/src/state/queries/usePostThread/traversal.ts @@ -444,7 +444,7 @@ export function buildThread({ const anchorPost = items.at(0) const hasAnchorFromCache = anchorPost && anchorPost.type === 'threadPost' const skeletonReplies = hasAnchorFromCache - ? anchorPost.value.post.replyCount ?? 4 + ? (anchorPost.value.post.replyCount ?? 4) : 4 if (!items.length) { |