(noteId: number, data: NotesUpdate)
| 544 | } |
| 545 | |
| 546 | async function updateNote(noteId: number, data: NotesUpdate) { |
| 547 | markPersistedStorageMutation() |
| 548 | await api.notes.patchNotesById(String(noteId), data) |
| 549 | |
| 550 | if (isNoteListMembershipAffecting(data)) { |
| 551 | await getNotes(queryByLibraryOrFolderOrSearch.value) |
| 552 | await refreshSelectedNote() |
| 553 | return |
| 554 | } |
| 555 | |
| 556 | // Переименование/описание не меняют состав списка — обновляем точечно. |
| 557 | patchNoteInCollections(noteId, data) |
| 558 | } |
| 559 | |
| 560 | async function updateNotes(noteIds: number[], data: NotesUpdate[]) { |
| 561 | markPersistedStorageMutation() |
no test coverage detected