Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Other

Manav Rathi0be4aed1854d
diff --git a/web/apps/photos/src/components/PhotoViewer/index.tsx b/web/apps/photos/src/components/PhotoViewer/index.tsx
index 4d070c6b4b..6dfdfd825a 100644
--- a/web/apps/photos/src/components/PhotoViewer/index.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/index.tsx
@@ -252,7 +252,7 @@ function PhotoViewer(props: PhotoViewerProps) {
break;
case "l":
case "L":
- onFavClick(photoSwipe?.currItem as EnteFile);
+ handleFavoriteClick();
break;
case "ArrowLeft":
handleArrowClick(event, "left");
@@ -275,7 +275,7 @@ function PhotoViewer(props: PhotoViewerProps) {
window.removeEventListener("copy", handleCopyEvent);
}
};
- }, [isOpen, photoSwipe, showInfo]);
+ }, [isOpen, photoSwipe, showInfo, favoriteFileIDs]);
useEffect(() => {
if (photoSwipe) {
@@ -515,7 +515,7 @@ function PhotoViewer(props: PhotoViewerProps) {
handleCloseInfo();
};
- const handleFavoriteClick = async () => {
+ const handleFavoriteClick = () => {
const file = photoSwipe?.currItem as EnteFile;
if (
!file ||