Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(mobile/note_icon): wrong icons displayed
Elian Doranaa4942a0da88
diff --git a/apps/client/src/widgets/note_icon.tsx b/apps/client/src/widgets/note_icon.tsxindex cdf66b5735..b5afb54717 100644--- a/apps/client/src/widgets/note_icon.tsx+++ b/apps/client/src/widgets/note_icon.tsx@@ -185,7 +185,8 @@ function NoteIconList({ note, onHide, columnCount }: {rowHeight={ICON_SIZE}cellComponent={IconItemCell}cellProps={{- filteredIcons+ filteredIcons,+ columnCount}}/>) : (@@ -196,10 +197,11 @@ function NoteIconList({ note, onHide, columnCount }: {);}-function IconItemCell({ rowIndex, columnIndex, style, filteredIcons }: CellComponentProps<{+function IconItemCell({ rowIndex, columnIndex, style, filteredIcons, columnCount }: CellComponentProps<{filteredIcons: IconWithName[];+ columnCount: number;}>) {- const iconIndex = rowIndex * 12 + columnIndex;+ const iconIndex = rowIndex * columnCount + columnIndex;const iconData = filteredIcons[iconIndex] as IconWithName | undefined;if (!iconData) return <></> as React.ReactElement;