fix for non-sync WS messages

This commit is contained in:
azivner 2017-12-17 13:46:18 -05:00
parent ccc7775c7c
commit cf7ab2b8d6
3 changed files with 6 additions and 6 deletions

View File

@ -19,14 +19,14 @@ const messaging = (function() {
function messageHandler(event) {
const message = JSON.parse(event.data);
if (message.data.length > 0) {
console.log(message);
}
if (message.type === 'sync') {
lastPingTs = new Date().getTime();
const syncData = message.data.filter(sync => sync.source_id !== glob.sourceId);
if (syncData.length > 0) {
console.log("Sync data: ", message);
}
if (syncData.some(sync => sync.entity_name === 'notes_tree')) {
console.log("Reloading tree because of background changes");

View File

@ -1 +1 @@
module.exports = { build_date:"2017-12-16T12:22:45-05:00", build_revision: "0c0e95b91e6d42c9aaf7921d83630ab36a41e0ae" };
module.exports = { build_date:"2017-12-16T21:37:48-05:00", build_revision: "ccc7775c7cff5cdfcad1102ec6ca1ab15612c851" };

View File

@ -93,7 +93,7 @@
<input autocomplete="off" value="" id="note-title" style="font-size: x-large; border: 0; flex-grow: 100;" tabindex="1">
<button class="btn btn-xs" style="margin-right: 10px;" onclick="noteHistory.showCurrentNoteHistory();">Note history</button>
<button class="btn btn-xs" style="margin: 10px;" onclick="noteHistory.showCurrentNoteHistory();">Note history</button>
</div>
</div>