mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
removed annoying "sync update in progress" toast message
This commit is contained in:
parent
3a78a75afc
commit
f50084dc1b
3 changed files with 5 additions and 11 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue