Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit b8f97e7

Browse files
committed
fix: show dialog on offline operation failure
1 parent ff7c3c4 commit b8f97e7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/app/services/sync/voyager.service.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,16 @@ export class VoyagerService {
6363
const options: DataSyncConfig = {
6464
conflictListener: new ConflictLogger(this.alertCtrl),
6565
fileUpload: true,
66-
mutationCacheUpdates: taskCacheUpdates
66+
mutationCacheUpdates: taskCacheUpdates,
67+
offlineQueueListener: {
68+
onOperationFailure: (operation) => {
69+
this.alertCtrl.create({
70+
message: `Failed to replicate offline change: ${operation.operationName}`
71+
}).then((dialog) => {
72+
dialog.present();
73+
});
74+
}
75+
}
6776
};
6877

6978
if (!this.openShift.hasSyncConfig()) {

0 commit comments

Comments
 (0)