mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
removed annoying "sync update in progress" toast message
This commit is contained in:
parent
3a78a75afc
commit
f50084dc1b
@ -454,7 +454,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const note = await froca.getNote(node.data.noteId);
|
const note = await froca.getNote(node.data.noteId, true);
|
||||||
|
|
||||||
if (!note || note.isDeleted) {
|
if (!note || note.isDeleted) {
|
||||||
return;
|
return;
|
||||||
|
@ -111,13 +111,6 @@ export default class SyncStatusWidget extends BasicWidget {
|
|||||||
|
|
||||||
processMessage(message) {
|
processMessage(message) {
|
||||||
if (message.type === 'sync-pull-in-progress') {
|
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.syncState = 'in-progress';
|
||||||
this.lastSyncedPush = message.lastSyncedPush;
|
this.lastSyncedPush = message.lastSyncedPush;
|
||||||
}
|
}
|
||||||
@ -126,9 +119,6 @@ export default class SyncStatusWidget extends BasicWidget {
|
|||||||
this.lastSyncedPush = message.lastSyncedPush;
|
this.lastSyncedPush = message.lastSyncedPush;
|
||||||
}
|
}
|
||||||
else if (message.type === 'sync-finished') {
|
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.syncState = 'connected';
|
||||||
this.lastSyncedPush = message.lastSyncedPush;
|
this.lastSyncedPush = message.lastSyncedPush;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ const log = require('../../services/log');
|
|||||||
const syncOptions = require('../../services/sync_options');
|
const syncOptions = require('../../services/sync_options');
|
||||||
const dateUtils = require('../../services/date_utils');
|
const dateUtils = require('../../services/date_utils');
|
||||||
const utils = require('../../services/utils');
|
const utils = require('../../services/utils');
|
||||||
|
const ws = require('../../services/ws');
|
||||||
|
|
||||||
async function testSync() {
|
async function testSync() {
|
||||||
try {
|
try {
|
||||||
@ -60,6 +61,9 @@ function checkSync() {
|
|||||||
function syncNow() {
|
function syncNow() {
|
||||||
log.info("Received request to trigger sync now.");
|
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();
|
return syncService.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user