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

Allow cancelling sync and fixed resource issue

This commit is contained in:
Laurent Cozic
2017-07-09 16:47:05 +01:00
parent de16573742
commit 297edfa682
11 changed files with 210 additions and 33 deletions

View File

@@ -16,12 +16,17 @@ reg.logger = () => {
return reg.logger_;
}
reg.setLogger = (l) => {
reg.logger_ = l;
}
reg.oneDriveApi = () => {
if (reg.oneDriveApi_) return reg.oneDriveApi_;
const isPublic = Setting.value('appType') != 'cli';
reg.oneDriveApi_ = new OneDriveApi(parameters().oneDrive.id, parameters().oneDrive.secret, isPublic);
reg.oneDriveApi_.setLogger(reg.logger());
reg.oneDriveApi_.on('authRefreshed', (a) => {
reg.logger().info('Saving updated OneDrive auth.');