Tag reload note count on download
This commit is contained in:
@@ -472,7 +472,7 @@ class NotesCtrl extends PureCtrl {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (note.errorDecrypting) {
|
if (note.errorDecrypting) {
|
||||||
if (note.waitingForKeys) {
|
if (note.waitingForKey) {
|
||||||
flags.push({
|
flags.push({
|
||||||
text: "Waiting For Keys",
|
text: "Waiting For Keys",
|
||||||
class: 'info'
|
class: 'info'
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ class RootCtrl extends PureCtrl {
|
|||||||
updateSyncStatus() {
|
updateSyncStatus() {
|
||||||
const syncStatus = this.application.getSyncStatus();
|
const syncStatus = this.application.getSyncStatus();
|
||||||
const stats = syncStatus.getStats();
|
const stats = syncStatus.getStats();
|
||||||
console.log("SN: RootCtrl -> updateSyncStatus -> stats", stats);
|
|
||||||
if (stats.downloadCount > 20) {
|
if (stats.downloadCount > 20) {
|
||||||
const text = `Downloading ${stats.downloadCount} items. Keep app open.`;
|
const text = `Downloading ${stats.downloadCount} items. Keep app open.`;
|
||||||
this.syncStatus = this.statusManager.replaceStatusWithString(
|
this.syncStatus = this.statusManager.replaceStatusWithString(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { SNNote, SNSmartTag, ContentTypes } from 'snjs';
|
import { SNNote, SNSmartTag, ContentTypes, ApplicationEvents } from 'snjs';
|
||||||
import template from '%/tags.pug';
|
import template from '%/tags.pug';
|
||||||
import { AppStateEvents } from '@/state';
|
import { AppStateEvents } from '@/state';
|
||||||
import { PANEL_NAME_TAGS } from '@/controllers/constants';
|
import { PANEL_NAME_TAGS } from '@/controllers/constants';
|
||||||
@@ -97,6 +97,21 @@ class TagsPanelCtrl extends PureCtrl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async onAppEvent(eventName) {
|
||||||
|
super.onAppEvent(eventName);
|
||||||
|
if (eventName === ApplicationEvents.LocalDataIncrementalLoad) {
|
||||||
|
this.reloadNoteCounts();
|
||||||
|
} else if (eventName === ApplicationEvents.SyncStatusChanged) {
|
||||||
|
const syncStatus = this.application.getSyncStatus();
|
||||||
|
const stats = syncStatus.getStats();
|
||||||
|
if (stats.downloadCount > 0) {
|
||||||
|
this.reloadNoteCounts();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reloadNoteCounts() {
|
reloadNoteCounts() {
|
||||||
let allTags = [];
|
let allTags = [];
|
||||||
if (this.state.tags) {
|
if (this.state.tags) {
|
||||||
|
|||||||
@@ -47,7 +47,8 @@
|
|||||||
)
|
)
|
||||||
.count {{self.state.noteCounts[tag.uuid]}}
|
.count {{self.state.noteCounts[tag.uuid]}}
|
||||||
.danger.small-text.bold(ng-show='tag.content.conflict_of') Conflicted Copy
|
.danger.small-text.bold(ng-show='tag.content.conflict_of') Conflicted Copy
|
||||||
.danger.small-text.bold(ng-show='tag.errorDecrypting') Missing Keys
|
.danger.small-text.bold(ng-show='tag.errorDecrypting && !tag.waitingForKey') Missing Keys
|
||||||
|
.info.small-text.bold(ng-show='tag.errorDecrypting && tag.waitingForKey') Waiting For Keys
|
||||||
.menu(ng-show='self.state.selectedTag == tag')
|
.menu(ng-show='self.state.selectedTag == tag')
|
||||||
a.item(ng-click='self.selectedRenameTag($event, tag)', ng-show='!self.state.editingTag') Rename
|
a.item(ng-click='self.selectedRenameTag($event, tag)', ng-show='!self.state.editingTag') Rename
|
||||||
a.item(ng-click='self.saveTag($event, tag)', ng-show='self.state.editingTag') Save
|
a.item(ng-click='self.saveTag($event, tag)', ng-show='self.state.editingTag') Save
|
||||||
|
|||||||
123
dist/javascripts/app.js
vendored
123
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user