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

All: Fixes #536: Allow changing sync target file path

This commit is contained in:
Laurent Cozic
2018-05-21 16:26:01 +01:00
parent ed70cf571c
commit 429f2d5aab
3 changed files with 19 additions and 15 deletions

View File

@@ -30,6 +30,11 @@ reg.showErrorMessageBox = (message) => {
reg.showErrorMessageBoxHandler_(message);
}
reg.resetSyncTarget = (syncTargetId = null) => {
if (syncTargetId === null) syncTargetId = Setting.value('sync.target');
delete reg.syncTargets_[syncTargetId];
}
reg.syncTarget = (syncTargetId = null) => {
if (syncTargetId === null) syncTargetId = Setting.value('sync.target');
if (reg.syncTargets_[syncTargetId]) return reg.syncTargets_[syncTargetId];