1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-29 19:13:59 +02:00

Merge branch 'dev' of github.com:laurent22/joplin into dev

This commit is contained in:
Laurent Cozic 2021-07-03 19:28:20 +01:00
commit c420ad4392

View File

@ -99,7 +99,7 @@ class Bridge {
return;
}
await this.restoreState();
const restoredState = await this.restoreState();
await this.checkAuth();
if (!this.token_) return; // Didn't get a token
@ -117,6 +117,7 @@ class Bridge {
}
this.dispatch({ type: 'TAGS_SET', tags: tags });
if (restoredState.selectedFolderId) this.dispatch({ type: 'SELECTED_FOLDER_SET', id: restoredState.selectedFolderId });
}
async checkAuth() {
@ -239,9 +240,7 @@ class Bridge {
async restoreState() {
const s = await this.storageGet(null);
console.info('Popup: Restoring saved state:', s);
if (!s) return;
if (s.selectedFolderId) this.dispatch({ type: 'SELECTED_FOLDER_SET', id: s.selectedFolderId });
return s;
}
async findClipperServerPort() {