You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Fixed multiple sync init issue
This commit is contained in:
@ -95,6 +95,8 @@ class SideMenuContentComponent extends Component {
|
||||
}
|
||||
|
||||
async synchronize_press() {
|
||||
const action = this.props.syncStarted ? 'cancel' : 'start';
|
||||
|
||||
if (Setting.value('sync.target') == Setting.SYNC_TARGET_ONEDRIVE && !reg.oneDriveApi().auth()) {
|
||||
this.props.dispatch({ type: 'SIDE_MENU_CLOSE' });
|
||||
|
||||
@ -114,7 +116,7 @@ class SideMenuContentComponent extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.props.syncStarted) {
|
||||
if (action == 'cancel') {
|
||||
sync.cancel();
|
||||
} else {
|
||||
reg.scheduleSync(0);
|
||||
|
Reference in New Issue
Block a user