sync update persistent notification

This commit is contained in:
zadam
2019-10-25 22:20:14 +02:00
parent edc23940d0
commit 22d48b0586
3 changed files with 30 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
import utils from './utils.js';
import toastService from "./toast.js";
import treeService from "./tree.js";
const $outstandingSyncsCount = $("#outstanding-syncs-count");
@@ -159,6 +158,21 @@ setTimeout(() => {
}, 1000);
}, 0);
subscribeToMessages(message => {
if (message.type === 'sync-pull-in-progress') {
toastService.showPersistent({
id: 'sync',
title: "Sync status",
message: "Sync update in progress",
icon: "refresh"
});
}
if (message.type === 'sync-pull-finished') {
toastService.closePersistent('sync');
}
});
export default {
logError,
subscribeToMessages,