Load tags right away, 3.0.3-beta2
This commit is contained in:
@@ -18,17 +18,18 @@ angular.module('app')
|
||||
}
|
||||
})
|
||||
.controller('TagsCtrl', function ($rootScope, modelManager, syncManager, $timeout, componentManager, authManager) {
|
||||
let initialLoad = true;
|
||||
// Wrap in timeout so that selectTag is defined
|
||||
$timeout(() => {
|
||||
this.smartTags = modelManager.getSmartTags();
|
||||
this.selectTag(this.smartTags[0]);
|
||||
})
|
||||
|
||||
syncManager.addEventHandler((syncEvent, data) => {
|
||||
if(syncEvent == "initial-data-loaded" || syncEvent == "sync:completed") {
|
||||
if(syncEvent == "local-data-loaded"
|
||||
|| syncEvent == "sync:completed"
|
||||
|| syncEvent == "local-data-incremental-load") {
|
||||
this.tags = modelManager.tags;
|
||||
this.smartTags = modelManager.getSmartTags();
|
||||
|
||||
if(initialLoad) {
|
||||
initialLoad = false;
|
||||
this.selectTag(this.smartTags[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"ng-class" => "{'selected' : ctrl.selectedTag == tag, 'faded' : !tag.content.isAllTag}"}
|
||||
.info
|
||||
%input.title{"ng-disabled" => "true", "ng-model" => "tag.title"}
|
||||
.count{"ng-show" => "tag.content.isAllTag"} {{ctrl.noteCount(tag)}}
|
||||
|
||||
.tags-title-section.section-title-bar
|
||||
.section-title-bar-header
|
||||
|
||||
Reference in New Issue
Block a user