decoupled protected session holder from presentation stuff and similar things

This commit is contained in:
azivner
2018-03-25 21:16:57 -04:00
parent 47eb1e3e02
commit ac1b06967f
12 changed files with 130 additions and 99 deletions

View File

@@ -1,6 +1,7 @@
import treeService from '../services/tree.js';
import messagingService from '../services/messaging.js';
import server from '../services/server.js';
import utils from "../services/utils";
const $dialog = $("#recent-notes-dialog");
const $searchInput = $('#recent-notes-search-input');
@@ -92,6 +93,14 @@ async function showDialog() {
setTimeout(reload, 100);
messagingService.subscribeToMessages(syncData => {
if (syncData.some(sync => sync.entityName === 'recent_notes')) {
console.log(utils.now(), "Reloading recent notes because of background changes");
reload();
}
});
export default {
showDialog,
addRecentNote,