Refactor auth manager and async storage manager

This commit is contained in:
Mo Bitar
2018-06-28 11:44:23 -05:00
parent 7b2f18bfab
commit 39062f17fd
9 changed files with 576 additions and 373 deletions

View File

@@ -7,7 +7,7 @@ angular.module('app')
function PasscodeManager($rootScope, $timeout, modelManager, dbManager, authManager, storageManager) {
this._hasPasscode = storageManager.getItem("offlineParams", StorageManager.Fixed) != null;
this._hasPasscode = storageManager.getItemSync("offlineParams", StorageManager.Fixed) != null;
this._locked = this._hasPasscode;
this.isLocked = function() {
@@ -23,7 +23,7 @@ angular.module('app')
}
this.passcodeAuthParams = function() {
return JSON.parse(storageManager.getItem("offlineParams", StorageManager.Fixed));
return JSON.parse(storageManager.getItemSync("offlineParams", StorageManager.Fixed));
}
this.protocolVersion = function() {