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

Commit

Permalink
fix: show dialog on offline operation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Aug 9, 2019
1 parent ff7c3c4 commit b8f97e7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/services/sync/voyager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ export class VoyagerService {
const options: DataSyncConfig = {
conflictListener: new ConflictLogger(this.alertCtrl),
fileUpload: true,
mutationCacheUpdates: taskCacheUpdates
mutationCacheUpdates: taskCacheUpdates,
offlineQueueListener: {
onOperationFailure: (operation) => {
this.alertCtrl.create({
message: `Failed to replicate offline change: ${operation.operationName}`
}).then((dialog) => {
dialog.present();
});
}
}
};

if (!this.openShift.hasSyncConfig()) {
Expand Down

0 comments on commit b8f97e7

Please sign in to comment.