1
0
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:
Laurent Cozic
2017-07-31 18:32:51 +00:00
parent e5d4c649ad
commit 2882aef8e4
3 changed files with 31 additions and 8 deletions

View File

@ -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);