Bluesky app fork with some witchin' additions 💫

Revise cache times (#1942)

(cherry picked from commit 1be2060a2b81741dcf9a392160af87d2747b3497)

authored by

Eric Bailey and committed by
GitHub
6f57192b 1952705d

+14 -14
+1 -1
src/state/queries/app-passwords.ts
··· 9 9 export function useAppPasswordsQuery() { 10 10 const {agent} = useSession() 11 11 return useQuery({ 12 - staleTime: STALE.INFINITY, 12 + staleTime: STALE.MINUTES.ONE, 13 13 queryKey: RQKEY(), 14 14 queryFn: async () => { 15 15 const res = await agent.com.atproto.server.listAppPasswords({})
+1 -1
src/state/queries/list-members.ts
··· 18 18 QueryKey, 19 19 RQPageParam 20 20 >({ 21 - staleTime: STALE.INFINITY, 21 + staleTime: STALE.MINUTES.ONE, 22 22 queryKey: RQKEY(uri), 23 23 async queryFn({pageParam}: {pageParam: RQPageParam}) { 24 24 const res = await agent.app.bsky.graph.getList({
+1 -1
src/state/queries/list-memberships.ts
··· 40 40 export function useDangerousListMembershipsQuery() { 41 41 const {agent, currentAccount} = useSession() 42 42 return useQuery<ListMembersip[]>({ 43 - staleTime: STALE.INFINITY, 43 + staleTime: STALE.MINUTES.FIVE, 44 44 queryKey: RQKEY(), 45 45 async queryFn() { 46 46 if (!currentAccount) {
+1 -1
src/state/queries/list.ts
··· 20 20 export function useListQuery(uri?: string) { 21 21 const {agent} = useSession() 22 22 return useQuery<AppBskyGraphDefs.ListView, Error>({ 23 - staleTime: STALE.INFINITY, 23 + staleTime: STALE.MINUTES.ONE, 24 24 queryKey: RQKEY(uri || ''), 25 25 async queryFn() { 26 26 if (!uri) {
+1 -1
src/state/queries/my-blocked-accounts.ts
··· 16 16 QueryKey, 17 17 RQPageParam 18 18 >({ 19 - staleTime: STALE.INFINITY, 19 + staleTime: STALE.MINUTES.ONE, 20 20 queryKey: RQKEY(), 21 21 async queryFn({pageParam}: {pageParam: RQPageParam}) { 22 22 const res = await agent.app.bsky.graph.getBlocks({
+1 -1
src/state/queries/my-lists.ts
··· 11 11 export function useMyListsQuery(filter: MyListsFilter) { 12 12 const {agent, currentAccount} = useSession() 13 13 return useQuery<AppBskyGraphDefs.ListView[]>({ 14 - staleTime: STALE.INFINITY, 14 + staleTime: STALE.MINUTES.ONE, 15 15 queryKey: RQKEY(filter), 16 16 async queryFn() { 17 17 let lists: AppBskyGraphDefs.ListView[] = []
+1 -1
src/state/queries/my-muted-accounts.ts
··· 16 16 QueryKey, 17 17 RQPageParam 18 18 >({ 19 - staleTime: STALE.INFINITY, 19 + staleTime: STALE.MINUTES.ONE, 20 20 queryKey: RQKEY(), 21 21 async queryFn({pageParam}: {pageParam: RQPageParam}) { 22 22 const res = await agent.app.bsky.graph.getMutes({
+1 -1
src/state/queries/preferences/index.ts
··· 34 34 const {agent, hasSession} = useSession() 35 35 return useQuery({ 36 36 enabled: hasSession, 37 - staleTime: STALE.INFINITY, 37 + staleTime: STALE.MINUTES.ONE, 38 38 queryKey: usePreferencesQueryKey, 39 39 queryFn: async () => { 40 40 const res = await agent.getPreferences()
+1 -1
src/state/queries/profile-extra-info.ts
··· 13 13 export function useProfileExtraInfoQuery(did: string) { 14 14 const {agent} = useSession() 15 15 return useQuery({ 16 - staleTime: STALE.INFINITY, 16 + staleTime: STALE.MINUTES.ONE, 17 17 queryKey: RQKEY(did), 18 18 async queryFn() { 19 19 const [listsRes, feedsRes] = await Promise.all([
+1 -1
src/state/queries/profile-feedgens.ts
··· 23 23 QueryKey, 24 24 RQPageParam 25 25 >({ 26 - staleTime: STALE.INFINITY, 26 + staleTime: STALE.MINUTES.ONE, 27 27 queryKey: RQKEY(did), 28 28 async queryFn({pageParam}: {pageParam: RQPageParam}) { 29 29 const res = await agent.app.bsky.feed.getActorFeeds({
+1 -1
src/state/queries/profile-follows.ts
··· 19 19 QueryKey, 20 20 RQPageParam 21 21 >({ 22 - staleTime: STALE.INFINITY, 22 + staleTime: STALE.MINUTES.ONE, 23 23 queryKey: RQKEY(did || ''), 24 24 async queryFn({pageParam}: {pageParam: RQPageParam}) { 25 25 const res = await agent.app.bsky.graph.getFollows({
+1 -1
src/state/queries/profile-lists.ts
··· 19 19 QueryKey, 20 20 RQPageParam 21 21 >({ 22 - staleTime: STALE.INFINITY, 22 + staleTime: STALE.MINUTES.ONE, 23 23 queryKey: RQKEY(did), 24 24 async queryFn({pageParam}: {pageParam: RQPageParam}) { 25 25 const res = await agent.app.bsky.graph.getLists({
+1 -1
src/state/queries/suggested-feeds.ts
··· 16 16 QueryKey, 17 17 string | undefined 18 18 >({ 19 - staleTime: STALE.INFINITY, 19 + staleTime: STALE.HOURS.ONE, 20 20 queryKey: suggestedFeedsQueryKey, 21 21 queryFn: async ({pageParam}) => { 22 22 const res = await agent.app.bsky.feed.getSuggestedFeeds({
+1 -1
src/state/queries/suggested-follows.ts
··· 34 34 string | undefined 35 35 >({ 36 36 enabled: !!moderationOpts, 37 - staleTime: STALE.INFINITY, 37 + staleTime: STALE.HOURS.ONE, 38 38 queryKey: suggestedFollowsQueryKey, 39 39 queryFn: async ({pageParam}) => { 40 40 const res = await agent.app.bsky.actor.getSuggestions({