Force refresh on physical button press

This commit is contained in:
Mo Bitar
2018-04-06 09:45:24 -05:00
parent 734c867448
commit c1aaef624d
2 changed files with 5 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ angular.module('app')
if(!extWindow) {
return;
}
this.selectRoom(extWindow);
$timeout(() => {
@@ -94,7 +94,7 @@ angular.module('app')
} else {
this.syncUpdated();
}
}, null, "refreshData");
}, {force: true}, "refreshData");
}
this.syncUpdated = function() {

View File

@@ -203,7 +203,9 @@ class SyncManager {
var allDirtyItems = this.modelManager.getDirtyItems();
if(this.syncStatus.syncOpInProgress) {
// When a user hits the physical refresh button, we want to force refresh, in case
// the sync engine is stuck in some inProgress loop.
if(this.syncStatus.syncOpInProgress && !options.force) {
this.repeatOnCompletion = true;
if(callback) {
this.queuedCallbacks.push(callback);