mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Clipper: Fixes #5130: Clipper does not remember notebook
This commit is contained in:
parent
cebec1a992
commit
5258cc335a
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user