mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-26 18:58:21 +02:00
Desktop: Fix: Notes would appear to be in the wrong notebook after having been shared
This commit is contained in:
parent
b92ab2b8cc
commit
96931877cf
@ -329,7 +329,7 @@ export default class Folder extends BaseItem {
|
|||||||
// Find all the notes where the share_id is not the same as the
|
// Find all the notes where the share_id is not the same as the
|
||||||
// parent share_id because we only need to update those.
|
// parent share_id because we only need to update those.
|
||||||
const rows = await this.db().selectAll(`
|
const rows = await this.db().selectAll(`
|
||||||
SELECT notes.id, folders.share_id
|
SELECT notes.id, folders.share_id, notes.parent_id
|
||||||
FROM notes
|
FROM notes
|
||||||
LEFT JOIN folders ON notes.parent_id = folders.id
|
LEFT JOIN folders ON notes.parent_id = folders.id
|
||||||
WHERE notes.share_id != folders.share_id
|
WHERE notes.share_id != folders.share_id
|
||||||
@ -339,6 +339,7 @@ export default class Folder extends BaseItem {
|
|||||||
await Note.save({
|
await Note.save({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
share_id: row.share_id || '',
|
share_id: row.share_id || '',
|
||||||
|
parent_id: row.parent_id,
|
||||||
updated_time: Date.now(),
|
updated_time: Date.now(),
|
||||||
}, { autoTimestamp: false });
|
}, { autoTimestamp: false });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user