Fix 'Del' hotkey to delete current image.

This commit is contained in:
Alexandre Macabies 2023-07-22 22:30:53 +02:00 committed by psychedelicious
parent 075f9b3a7a
commit 00d3cd4aed

View File

@ -210,6 +210,14 @@ const CurrentImageButtons = (props: CurrentImageButtonsProps) => {
[imageDTO, shouldShowImageDetails, toaster]
);
useHotkeys(
'delete',
() => {
handleDelete();
},
[dispatch, imageDTO]
);
const handleClickProgressImagesToggle = useCallback(() => {
dispatch(setShouldShowProgressInViewer(!shouldShowProgressInViewer));
}, [dispatch, shouldShowProgressInViewer]);