Skip to content

Commit f4c61a0

Browse files
authored
SF-3495 Store pending ops when Scripture Forge client starts offline (#3407)
1 parent d6c91cd commit f4c61a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SIL.XForge.Scripture/ClientApp/src/xforge-common/models/realtime-doc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ export abstract class RealtimeDoc<T = any, Ops = any, P = any> {
133133
// update offline data when the op has been acknowledged
134134
this.adapter.submitOp(ops, source).then(() => this.updateOfflineData());
135135
// update offline data when the op is first submitted
136-
await this.updateOfflineData();
136+
// we force the offline update, so if the client is offline, the pending ops will be stored in IndexedDB
137+
await this.updateOfflineData(true);
137138
await this.realtimeService.onLocalDocUpdate(this);
138139
}
139140

0 commit comments

Comments
 (0)