mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
reloading tree now doesn't force note reload
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const status = (function() {
|
||||
const treeEl = $("#tree");
|
||||
const $changesToPushCountEl = $("#changesToPushCount");
|
||||
const changesToPushCountEl = $("#changesToPushCount");
|
||||
|
||||
async function checkStatus() {
|
||||
const resp = await $.ajax({
|
||||
@@ -33,7 +32,13 @@ const status = (function() {
|
||||
noteTree.reload();
|
||||
}
|
||||
|
||||
$changesToPushCountEl.html(resp.changesToPushCount);
|
||||
if (resp.changedCurrentNote) {
|
||||
message('Reloading note because background change');
|
||||
|
||||
noteEditor.reload();
|
||||
}
|
||||
|
||||
changesToPushCountEl.html(resp.changesToPushCount);
|
||||
}
|
||||
|
||||
setInterval(checkStatus, 5 * 1000);
|
||||
|
||||
Reference in New Issue
Block a user