1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Many improvements and bug fixes

This commit is contained in:
Laurent Cozic
2017-10-18 23:13:53 +01:00
parent 4db08d1a26
commit 1845a0105c
11 changed files with 69 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ import { FileApiDriverOneDrive } from 'lib/file-api-driver-onedrive.js';
import { shim } from 'lib/shim.js';
import { time } from 'lib/time-utils.js';
import { FileApiDriverMemory } from 'lib/file-api-driver-memory.js';
import { PoorManIntervals } from 'lib/poor-man-intervals.js';
import { _ } from 'lib/locale.js';
const reg = {};
@@ -199,7 +198,7 @@ reg.syncStarted = async () => {
reg.setupRecurrentSync = () => {
if (reg.recurrentSyncId_) {
PoorManIntervals.clearInterval(reg.recurrentSyncId_);
shim.clearInterval(reg.recurrentSyncId_);
reg.recurrentSyncId_ = null;
}
@@ -208,7 +207,7 @@ reg.setupRecurrentSync = () => {
} else {
reg.logger().debug('Setting up recurrent sync with interval ' + Setting.value('sync.interval'));
reg.recurrentSyncId_ = PoorManIntervals.setInterval(() => {
reg.recurrentSyncId_ = shim.setInterval(() => {
reg.logger().info('Running background sync on timer...');
reg.scheduleSync(0);
}, 1000 * Setting.value('sync.interval'));