mirror of https://github.com/laurent22/joplin.git
Tools: Fixed tests when using Joplin Server as sync target
parent
99ea4b73b5
commit
401f1b1f83
|
@ -13,6 +13,7 @@ export default class ShareService {
|
|||
private static instance_: ShareService;
|
||||
private api_: JoplinServerApi = null;
|
||||
private store_: Store<any> = null;
|
||||
private initialized_ = false;
|
||||
|
||||
public static instance(): ShareService {
|
||||
if (this.instance_) return this.instance_;
|
||||
|
@ -21,11 +22,13 @@ export default class ShareService {
|
|||
}
|
||||
|
||||
public initialize(store: Store<any>, api: JoplinServerApi = null) {
|
||||
this.initialized_ = true;
|
||||
this.store_ = store;
|
||||
this.api_ = api;
|
||||
}
|
||||
|
||||
public get enabled(): boolean {
|
||||
if (!this.initialized_) return false;
|
||||
return [9, 10].includes(Setting.value('sync.target')); // Joplin Server, Joplin Cloud targets
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue