offline callback

This commit is contained in:
Mo Bitar
2017-01-28 23:34:06 -06:00
parent aa6388d8b0
commit f132da004d
2 changed files with 5 additions and 7 deletions

View File

@@ -71,10 +71,7 @@ angular.module('app.frontend')
// if no more notes, delete tag // if no more notes, delete tag
syncManager.sync(function(){ syncManager.sync(function(){
// force scope tags to update on sub directives // force scope tags to update on sub directives
$scope.tags = []; $scope.safeApply();
$timeout(function(){
$scope.tags = modelManager.tags;
})
}); });
} else { } else {
alert("To delete this tag, remove all its notes first."); alert("To delete this tag, remove all its notes first.");

View File

@@ -50,11 +50,12 @@ class SyncManager {
this.modelManager.removeItemLocally(item); this.modelManager.removeItemLocally(item);
} }
} }
if(callback) {
callback({success: true});
}
}.bind(this)) }.bind(this))
if(callback) {
callback({success: true});
}
} }
markAllItemsDirtyAndSaveOffline(callback) { markAllItemsDirtyAndSaveOffline(callback) {