about summary refs log tree commit diff
path: root/src/state/queries
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries')
-rw-r--r--src/state/queries/app-passwords.ts2
-rw-r--r--src/state/queries/list-members.ts2
-rw-r--r--src/state/queries/list-memberships.ts2
-rw-r--r--src/state/queries/list.ts2
-rw-r--r--src/state/queries/my-blocked-accounts.ts2
-rw-r--r--src/state/queries/my-lists.ts2
-rw-r--r--src/state/queries/my-muted-accounts.ts2
-rw-r--r--src/state/queries/preferences/index.ts2
-rw-r--r--src/state/queries/profile-extra-info.ts2
-rw-r--r--src/state/queries/profile-feedgens.ts2
-rw-r--r--src/state/queries/profile-follows.ts2
-rw-r--r--src/state/queries/profile-lists.ts2
-rw-r--r--src/state/queries/suggested-feeds.ts2
-rw-r--r--src/state/queries/suggested-follows.ts2
14 files changed, 14 insertions, 14 deletions
diff --git a/src/state/queries/app-passwords.ts b/src/state/queries/app-passwords.ts
index e79a26077..9aadfe2e4 100644
--- a/src/state/queries/app-passwords.ts
+++ b/src/state/queries/app-passwords.ts
@@ -9,7 +9,7 @@ export const RQKEY = () => ['app-passwords']
 export function useAppPasswordsQuery() {
   const {agent} = useSession()
   return useQuery({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(),
     queryFn: async () => {
       const res = await agent.com.atproto.server.listAppPasswords({})
diff --git a/src/state/queries/list-members.ts b/src/state/queries/list-members.ts
index ef3c955ad..ae932462d 100644
--- a/src/state/queries/list-members.ts
+++ b/src/state/queries/list-members.ts
@@ -18,7 +18,7 @@ export function useListMembersQuery(uri: string) {
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(uri),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.graph.getList({
diff --git a/src/state/queries/list-memberships.ts b/src/state/queries/list-memberships.ts
index b9bb91a24..7ab29d180 100644
--- a/src/state/queries/list-memberships.ts
+++ b/src/state/queries/list-memberships.ts
@@ -40,7 +40,7 @@ export interface ListMembersip {
 export function useDangerousListMembershipsQuery() {
   const {agent, currentAccount} = useSession()
   return useQuery<ListMembersip[]>({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.FIVE,
     queryKey: RQKEY(),
     async queryFn() {
       if (!currentAccount) {
diff --git a/src/state/queries/list.ts b/src/state/queries/list.ts
index 2270e722c..c31afe01b 100644
--- a/src/state/queries/list.ts
+++ b/src/state/queries/list.ts
@@ -20,7 +20,7 @@ export const RQKEY = (uri: string) => ['list', uri]
 export function useListQuery(uri?: string) {
   const {agent} = useSession()
   return useQuery<AppBskyGraphDefs.ListView, Error>({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(uri || ''),
     async queryFn() {
       if (!uri) {
diff --git a/src/state/queries/my-blocked-accounts.ts b/src/state/queries/my-blocked-accounts.ts
index c15ee5745..5a83bee2c 100644
--- a/src/state/queries/my-blocked-accounts.ts
+++ b/src/state/queries/my-blocked-accounts.ts
@@ -16,7 +16,7 @@ export function useMyBlockedAccountsQuery() {
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.graph.getBlocks({
diff --git a/src/state/queries/my-lists.ts b/src/state/queries/my-lists.ts
index 7e996c12c..0b049e65f 100644
--- a/src/state/queries/my-lists.ts
+++ b/src/state/queries/my-lists.ts
@@ -11,7 +11,7 @@ export const RQKEY = (filter: MyListsFilter) => ['my-lists', filter]
 export function useMyListsQuery(filter: MyListsFilter) {
   const {agent, currentAccount} = useSession()
   return useQuery<AppBskyGraphDefs.ListView[]>({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(filter),
     async queryFn() {
       let lists: AppBskyGraphDefs.ListView[] = []
diff --git a/src/state/queries/my-muted-accounts.ts b/src/state/queries/my-muted-accounts.ts
index c4408a04e..c46474b27 100644
--- a/src/state/queries/my-muted-accounts.ts
+++ b/src/state/queries/my-muted-accounts.ts
@@ -16,7 +16,7 @@ export function useMyMutedAccountsQuery() {
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.graph.getMutes({
diff --git a/src/state/queries/preferences/index.ts b/src/state/queries/preferences/index.ts
index f6ce20ee4..483076431 100644
--- a/src/state/queries/preferences/index.ts
+++ b/src/state/queries/preferences/index.ts
@@ -34,7 +34,7 @@ export function usePreferencesQuery() {
   const {agent, hasSession} = useSession()
   return useQuery({
     enabled: hasSession,
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: usePreferencesQueryKey,
     queryFn: async () => {
       const res = await agent.getPreferences()
diff --git a/src/state/queries/profile-extra-info.ts b/src/state/queries/profile-extra-info.ts
index c30a2c040..4e7890e32 100644
--- a/src/state/queries/profile-extra-info.ts
+++ b/src/state/queries/profile-extra-info.ts
@@ -13,7 +13,7 @@ export const RQKEY = (did: string) => ['profile-extra-info', did]
 export function useProfileExtraInfoQuery(did: string) {
   const {agent} = useSession()
   return useQuery({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(did),
     async queryFn() {
       const [listsRes, feedsRes] = await Promise.all([
diff --git a/src/state/queries/profile-feedgens.ts b/src/state/queries/profile-feedgens.ts
index 693168625..9f8033065 100644
--- a/src/state/queries/profile-feedgens.ts
+++ b/src/state/queries/profile-feedgens.ts
@@ -23,7 +23,7 @@ export function useProfileFeedgensQuery(
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(did),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.feed.getActorFeeds({
diff --git a/src/state/queries/profile-follows.ts b/src/state/queries/profile-follows.ts
index b9d95c298..71c51993d 100644
--- a/src/state/queries/profile-follows.ts
+++ b/src/state/queries/profile-follows.ts
@@ -19,7 +19,7 @@ export function useProfileFollowsQuery(did: string | undefined) {
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(did || ''),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.graph.getFollows({
diff --git a/src/state/queries/profile-lists.ts b/src/state/queries/profile-lists.ts
index f24c57858..919ac1153 100644
--- a/src/state/queries/profile-lists.ts
+++ b/src/state/queries/profile-lists.ts
@@ -19,7 +19,7 @@ export function useProfileListsQuery(did: string, opts?: {enabled?: boolean}) {
     QueryKey,
     RQPageParam
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(did),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
       const res = await agent.app.bsky.graph.getLists({
diff --git a/src/state/queries/suggested-feeds.ts b/src/state/queries/suggested-feeds.ts
index a2418a0c4..7e443028d 100644
--- a/src/state/queries/suggested-feeds.ts
+++ b/src/state/queries/suggested-feeds.ts
@@ -16,7 +16,7 @@ export function useSuggestedFeedsQuery() {
     QueryKey,
     string | undefined
   >({
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.HOURS.ONE,
     queryKey: suggestedFeedsQueryKey,
     queryFn: async ({pageParam}) => {
       const res = await agent.app.bsky.feed.getSuggestedFeeds({
diff --git a/src/state/queries/suggested-follows.ts b/src/state/queries/suggested-follows.ts
index 275450b97..b5bf920b3 100644
--- a/src/state/queries/suggested-follows.ts
+++ b/src/state/queries/suggested-follows.ts
@@ -34,7 +34,7 @@ export function useSuggestedFollowsQuery() {
     string | undefined
   >({
     enabled: !!moderationOpts,
-    staleTime: STALE.INFINITY,
+    staleTime: STALE.HOURS.ONE,
     queryKey: suggestedFollowsQueryKey,
     queryFn: async ({pageParam}) => {
       const res = await agent.app.bsky.actor.getSuggestions({