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

All: Started moving sync target logic under SyncTarget classes

This commit is contained in:
Laurent Cozic
2017-11-24 18:06:30 +00:00
parent d7f3cfd778
commit 946ad7c71a
10 changed files with 68 additions and 73 deletions

View File

@ -36,7 +36,7 @@ shared.synchronize_press = async function(comp) {
const action = comp.props.syncStarted ? 'cancel' : 'start';
if (Setting.value('sync.target') == Setting.SYNC_TARGET_ONEDRIVE && !reg.oneDriveApi().auth()) {
if (!reg.syncTarget().isAuthenticated()) {
comp.props.dispatch({
type: 'NAV_GO',
routeName: 'OneDriveLogin',
@ -46,7 +46,7 @@ shared.synchronize_press = async function(comp) {
let sync = null;
try {
sync = await reg.synchronizer(Setting.value('sync.target'))
sync = await reg.syncTarget().synchronizer();
} catch (error) {
reg.logger().info('Could not acquire synchroniser:');
reg.logger().info(error);