Disable auto-opening Account menu

This commit is contained in:
Mo Bitar
2018-08-14 09:55:43 -05:00
parent 4f7e6ec507
commit 8098e2af25
2 changed files with 10 additions and 3 deletions

View File

@@ -65,9 +65,12 @@ angular.module('app')
} }
this.updateOfflineStatus(); this.updateOfflineStatus();
if(this.offline && !passcodeManager.hasPasscode()) { $rootScope.$on("initial-data-loaded", () => {
this.showAccountMenu = true; // If the user has no notes and is offline, show Account menu
} if(this.offline && modelManager.noteCount() == 0) {
this.showAccountMenu = true;
}
})
this.findErrors = function() { this.findErrors = function() {
this.error = syncManager.syncStatus.error; this.error = syncManager.syncStatus.error;

View File

@@ -30,6 +30,10 @@ class ModelManager extends SFModelManager {
this.components.length = 0; this.components.length = 0;
} }
noteCount() {
return this.notes.length;
}
removeAllItemsFromMemory() { removeAllItemsFromMemory() {
for(var item of this.items) { for(var item of this.items) {
item.deleted = true; item.deleted = true;