1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Fixes #10589: Fix selected note changes on moving to a different folder (#10630)

This commit is contained in:
Henry Heino
2024-06-18 01:59:08 -07:00
committed by GitHub
parent 573ea6051c
commit ed31d8202b
8 changed files with 78 additions and 24 deletions

View File

@ -624,7 +624,7 @@ export default class Note extends BaseItem {
});
}
public static async moveToFolder(noteId: string, folderId: string) {
public static async moveToFolder(noteId: string, folderId: string, saveOptions: SaveOptions|null = null) {
if (folderId === this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot move note to "%s" notebook', this.getClass('Folder').conflictFolderTitle()));
// When moving a note to a different folder, the user timestamp is not
@ -643,7 +643,7 @@ export default class Note extends BaseItem {
updated_time: time.unixMs(),
};
return Note.save(modifiedNote, { autoTimestamp: false });
return Note.save(modifiedNote, { autoTimestamp: false, ...saveOptions });
}
public static changeNoteType(note: NoteEntity, type: string) {
@ -841,6 +841,7 @@ export default class Note extends BaseItem {
provisional: isProvisional,
ignoreProvisionalFlag: ignoreProvisionalFlag,
changedFields: changedFields,
...options?.dispatchOptions,
});
}