1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop, Mobile: Fixes #10292: Email to note address not presented in configuration screen before synchronisation (#10293)

This commit is contained in:
pedr
2024-04-10 07:37:00 -03:00
committed by GitHub
parent 238683e36f
commit 859d3e867e
2 changed files with 10 additions and 0 deletions

View File

@@ -311,4 +311,7 @@ export default class JoplinServerApi {
}
}
public async loadSession() {
await this.session();
}
}

View File

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