()
| 748 | } |
| 749 | |
| 750 | export function selectFirstNote() { |
| 751 | let firstNote: NoteRecord | undefined |
| 752 | |
| 753 | if (isSearch.value) { |
| 754 | firstNote = notesBySearch.value?.[0] |
| 755 | } |
| 756 | else { |
| 757 | firstNote = notes.value?.[0] |
| 758 | } |
| 759 | |
| 760 | if (firstNote) { |
| 761 | notesState.noteId = firstNote.id |
| 762 | selectedNoteIds.value = [firstNote.id] |
| 763 | lastSelectedNoteId.value = firstNote.id |
| 764 | } |
| 765 | else { |
| 766 | notesState.noteId = undefined |
| 767 | selectedNoteIds.value = [] |
| 768 | lastSelectedNoteId.value = undefined |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | function clearNotes() { |
| 773 | notes.value = [] |
no outgoing calls
no test coverage detected