You've already forked joplin
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:
@@ -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 { ApplicationPlatform, ApplicationType } from '../types';
|
||||||
import shim from '../shim';
|
import shim from '../shim';
|
||||||
import { _ } from '../locale';
|
import { _ } from '../locale';
|
||||||
|
import eventManager, { EventName } from '../eventManager';
|
||||||
|
import { reg } from '../registry';
|
||||||
|
|
||||||
type ActionType = 'LINK_USED' | 'COMPLETED' | 'ERROR';
|
type ActionType = 'LINK_USED' | 'COMPLETED' | 'ERROR';
|
||||||
type Action = {
|
type Action = {
|
||||||
@@ -108,6 +110,11 @@ export const checkIfLoginWasSuccessful = async (applicationsUrl: string) => {
|
|||||||
|
|
||||||
Setting.setValue('sync.10.username', jsonBody.id);
|
Setting.setValue('sync.10.username', jsonBody.id);
|
||||||
Setting.setValue('sync.10.password', jsonBody.password);
|
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 };
|
return { success: true };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user