You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
All: Add support for application plugins (#3257)
This commit is contained in:
@ -3,8 +3,9 @@ const BaseModel = require('lib/BaseModel');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const Resource = require('lib/models/Resource');
|
||||
const ResourceService = require('lib/services/ResourceService');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const Logger = require('lib/Logger').default;
|
||||
const EventEmitter = require('events');
|
||||
const shim = require('lib/shim').default;
|
||||
|
||||
class DecryptionWorker {
|
||||
constructor() {
|
||||
@ -64,7 +65,7 @@ class DecryptionWorker {
|
||||
async scheduleStart() {
|
||||
if (this.scheduleId_) return;
|
||||
|
||||
this.scheduleId_ = setTimeout(() => {
|
||||
this.scheduleId_ = shim.setTimeout(() => {
|
||||
this.scheduleId_ = null;
|
||||
this.start({
|
||||
masterKeyNotLoadedHandler: 'dispatch',
|
||||
@ -280,16 +281,16 @@ class DecryptionWorker {
|
||||
async destroy() {
|
||||
this.eventEmitter_.removeAllListeners();
|
||||
if (this.scheduleId_) {
|
||||
clearTimeout(this.scheduleId_);
|
||||
shim.clearTimeout(this.scheduleId_);
|
||||
this.scheduleId_ = null;
|
||||
}
|
||||
this.eventEmitter_ = null;
|
||||
DecryptionWorker.instance_ = null;
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const iid = setInterval(() => {
|
||||
const iid = shim.setInterval(() => {
|
||||
if (!this.startCalls_.length) {
|
||||
clearInterval(iid);
|
||||
shim.clearInterval(iid);
|
||||
resolve();
|
||||
}
|
||||
}, 100);
|
||||
|
Reference in New Issue
Block a user