Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Persist mobile soup list queries (#3294)

Sean Aye8c3710b72919
diff --git a/js/app/packages/queries/persistence-scopes.ts b/js/app/packages/queries/persistence-scopes.ts
index 5f033d6843..fcc35d14bc 100644
--- a/js/app/packages/queries/persistence-scopes.ts
+++ b/js/app/packages/queries/persistence-scopes.ts
@@ -5,6 +5,7 @@ import { authKeys } from './auth/keys';
import { channelKeys } from './channel/keys';
import { createPersistenceKey, type PersistScope } from './persistence';
import { createPerQueryIDBStore } from './persistence/per-query-idb';
+import { soupKeys } from './soup/keys';
const persistedChannelQueryPrefixes = [
channelKeys.mentions._def,
@@ -41,6 +42,16 @@ export function createQueryPersistenceScopes(
},
...(isNativeMobilePlatform()
? [
+ {
+ store: createPerQueryIDBStore({
+ dbName: createPersistenceKey('soup-list-queries', 1),
+ }),
+ maxAge: { value: 7, unit: 'd' },
+ buster,
+ shouldPersist: (queryKey: QueryKey) =>
+ partialMatchKey(queryKey, soupKeys.astItems._def),
+ shouldRestore: hasLoginCookie,
+ } satisfies PersistScope,
{
store: createPerQueryIDBStore({
dbName: createPersistenceKey('user-info', 1),