refactor: app state handling

1. fixes snapshot patches not being included
2. fixes all mutations being passed when syncing from scratch
3. simpler chat mutation model
4. do not retry if key is not found
This commit is contained in:
Adhiraj Singh
2022-01-07 14:29:52 +05:30
parent da65ae8f42
commit d15bde5d17
3 changed files with 60 additions and 36 deletions

View File

@@ -10,7 +10,10 @@ export interface PresenceData {
lastSeen?: number
}
export type ChatMutation = { syncAction: proto.ISyncActionData, index: string[], indexMac: Uint8Array, valueMac: Uint8Array, operation: number }
export type ChatMutation = {
syncAction: proto.ISyncActionData
index: string[]
}
export type AppStateChunk = { totalMutations : ChatMutation[], collectionsToHandle: WAPatchName[] }