mirror of https://github.com/laurent22/joplin.git
Desktop, Mobile: Fixes #10292: Email to note address not presented in configuration screen before synchronisation (#10293)
parent
238683e36f
commit
859d3e867e
|
@ -311,4 +311,7 @@ export default class JoplinServerApi {
|
|||
}
|
||||
}
|
||||
|
||||
public async loadSession() {
|
||||
await this.session();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ import Setting from '../models/Setting';
|
|||
import { ApplicationPlatform, ApplicationType } from '../types';
|
||||
import shim from '../shim';
|
||||
import { _ } from '../locale';
|
||||
import eventManager, { EventName } from '../eventManager';
|
||||
import { reg } from '../registry';
|
||||
|
||||
type ActionType = 'LINK_USED' | 'COMPLETED' | 'ERROR';
|
||||
type Action = {
|
||||
|
@ -108,6 +110,11 @@ export const checkIfLoginWasSuccessful = async (applicationsUrl: string) => {
|
|||
|
||||
Setting.setValue('sync.10.username', jsonBody.id);
|
||||
Setting.setValue('sync.10.password', jsonBody.password);
|
||||
|
||||
const fileApi = await reg.syncTarget().fileApi();
|
||||
await fileApi.driver().api().loadSession();
|
||||
eventManager.emit(EventName.SessionEstablished);
|
||||
|
||||
return { success: true };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue