Skip to content

Build your personal knowledge base with Trilium Notes

removed annoying "sync update in progress" toast message

zadamf50084dc1bbb
diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js
index a36fa4158f..b95d9453d7 100644
--- a/src/public/app/widgets/note_tree.js
+++ b/src/public/app/widgets/note_tree.js
@@ -454,7 +454,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
return;
}
- const note = await froca.getNote(node.data.noteId);
+ const note = await froca.getNote(node.data.noteId, true);
if (!note || note.isDeleted) {
return;
diff --git a/src/public/app/widgets/sync_status.js b/src/public/app/widgets/sync_status.js
index 15ab77fff9..6739198e52 100644
--- a/src/public/app/widgets/sync_status.js
+++ b/src/public/app/widgets/sync_status.js
@@ -111,13 +111,6 @@ export default class SyncStatusWidget extends BasicWidget {
processMessage(message) {
if (message.type === 'sync-pull-in-progress') {
- toastService.showPersistent({
- id: 'sync',
- title: "Sync status",
- message: "Sync update in progress",
- icon: "refresh"
- });
-
this.syncState = 'in-progress';
this.lastSyncedPush = message.lastSyncedPush;
}
@@ -126,9 +119,6 @@ export default class SyncStatusWidget extends BasicWidget {
this.lastSyncedPush = message.lastSyncedPush;
}
else if (message.type === 'sync-finished') {
- // this gives user a chance to see the toast in case of fast sync finish
- setTimeout(() => toastService.closePersistent('sync'), 1000);
-
this.syncState = 'connected';
this.lastSyncedPush = message.lastSyncedPush;
}
diff --git a/src/routes/api/sync.js b/src/routes/api/sync.js
index 4aaef2d585..c927103e3d 100644
--- a/src/routes/api/sync.js
+++ b/src/routes/api/sync.js
@@ -11,6 +11,7 @@ const log = require('../../services/log');
const syncOptions = require('../../services/sync_options');
const dateUtils = require('../../services/date_utils');
const utils = require('../../services/utils');
+const ws = require('../../services/ws');
async function testSync() {
try {
@@ -60,6 +61,9 @@ function checkSync() {
function syncNow() {
log.info("Received request to trigger sync now.");
+ // when explicitly asked for set in progress status immediatelly for faster user feedback
+ ws.syncPullInProgress();
+
return syncService.sync();
}