mirror of https://github.com/laurent22/joplin.git
Desktop: Fixes error when Joplin Cloud login is finished before the settings are saved (#10575)
parent
4952980e0a
commit
9e2b9e5b8d
packages/lib/services
|
@ -5,6 +5,7 @@ import shim from '../shim';
|
|||
import { _ } from '../locale';
|
||||
import eventManager, { EventName } from '../eventManager';
|
||||
import { reg } from '../registry';
|
||||
import SyncTargetRegistry from '../SyncTargetRegistry';
|
||||
|
||||
type ActionType = 'LINK_USED' | 'COMPLETED' | 'ERROR';
|
||||
type Action = {
|
||||
|
@ -110,6 +111,7 @@ export const checkIfLoginWasSuccessful = async (applicationsUrl: string) => {
|
|||
|
||||
Setting.setValue('sync.10.username', jsonBody.id);
|
||||
Setting.setValue('sync.10.password', jsonBody.password);
|
||||
Setting.setValue('sync.target', SyncTargetRegistry.nameToId('joplinCloud'));
|
||||
|
||||
const fileApi = await reg.syncTarget().fileApi();
|
||||
await fileApi.driver().api().loadSession();
|
||||
|
|
Loading…
Reference in New Issue