You've already forked joplin
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user