You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Desktop: Fixes error when Joplin Cloud login is finished before the settings are saved (#10575)
This commit is contained in:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user