(note: NoteResult)
| 1367 | } |
| 1368 | |
| 1369 | async function openNote(note: NoteResult) { |
| 1370 | notesData.isRestoreStateBlocked.value = true |
| 1371 | noteSearch.clearSearch(false) |
| 1372 | notesApp.hideNotesViewModes() |
| 1373 | notesApp.notesState.tagId = undefined |
| 1374 | notesApp.focusedFolderId.value = undefined |
| 1375 | notesApp.highlightedFolderIds.value.clear() |
| 1376 | notesApp.highlightedTagId.value = undefined |
| 1377 | |
| 1378 | const query = note.folder?.id |
| 1379 | ? { folderId: note.folder.id, isDeleted: note.isDeleted } |
| 1380 | : { isDeleted: note.isDeleted } |
| 1381 | |
| 1382 | if (note.folder?.id) { |
| 1383 | notesApp.notesState.folderId = note.folder.id |
| 1384 | notesApp.notesState.libraryFilter = undefined |
| 1385 | } |
| 1386 | else { |
| 1387 | notesApp.notesState.folderId = undefined |
| 1388 | notesApp.notesState.libraryFilter = note.isDeleted |
| 1389 | ? LibraryFilter.Trash |
| 1390 | : LibraryFilter.All |
| 1391 | } |
| 1392 | |
| 1393 | await notesData.getNotes(query) |
| 1394 | notesData.selectNote(note.id) |
| 1395 | await router.push({ name: RouterName.notesSpace }) |
| 1396 | } |
| 1397 | |
| 1398 | async function openHttpRequest(request: HttpRequestResult) { |
| 1399 | const httpFolders = useHttpFolders() |
no test coverage detected