fix: keep keyboard note switching snappy

This commit is contained in:
lucaronin
2026-04-19 11:49:48 +02:00
parent b22da65d44
commit 2d5361b2e9
4 changed files with 263 additions and 36 deletions

View File

@@ -11,8 +11,9 @@ import type {
import type { NoteListFilter } from '../../utils/noteListHelpers'
import { countByFilter, countAllByFilter, countAllNotesByFilter } from '../../utils/noteListHelpers'
import { NoteItem } from '../NoteItem'
import { prefetchNoteContent } from '../../hooks/useTabManagement'
import type { MultiSelectState } from '../../hooks/useMultiSelect'
import { resolveHeaderTitle, type DeletedNoteEntry } from './noteListUtils'
import { isDeletedNoteEntry, resolveHeaderTitle, type DeletedNoteEntry } from './noteListUtils'
import { filterEntriesByNoteListQuery, filterGroupsByNoteListQuery } from './noteListSearch'
import {
useChangeStatusResolver,
@@ -341,6 +342,7 @@ function useRenderItem({
allEntries={entries}
displayPropsOverride={displayPropsOverride}
onClickNote={handleClickNote}
onPrefetch={isDeletedNoteEntry(entry) ? undefined : prefetchNoteContent}
onContextMenu={contextMenuHandler}
/>
), [