fix: Fixed issue where note context menu would not open if right-clicking multiple times

This commit is contained in:
Aman Harwara
2023-08-12 22:19:42 +05:30
parent 92efecd350
commit 5af0ff8f2e
3 changed files with 20 additions and 69 deletions

View File

@@ -43,12 +43,10 @@ const NoteListItem: FunctionComponent<DisplayableListItemProps<SNNote>> = ({
const hasFiles = application.items.itemsReferencingItem(item).filter(isFile).length > 0
const openNoteContextMenu = (posX: number, posY: number) => {
notesController.setContextMenuOpen(false)
notesController.setContextMenuClickLocation({
x: posX,
y: posY,
})
notesController.reloadContextMenuLayout()
notesController.setContextMenuOpen(true)
}