Skip to content

armgit / ente

Public Imported from GitHub
0

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

[photos][web] Combine album search reset effects

AswinAsok59a8476e8ab5
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 7c4d5eb988..4d28e53337 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -571,13 +571,9 @@ const Page: React.FC = () => {
: state.normalCollectionSummaries;
useEffect(() => {
- if (barMode != "albums") setAlbumSearchQuery("");
- }, [barMode]);
-
- useEffect(() => {
- if (activeCollectionID == PseudoCollectionID.all)
+ if (barMode != "albums" || activeCollectionID == PseudoCollectionID.all)
setAlbumSearchQuery("");
- }, [activeCollectionID]);
+ }, [barMode, activeCollectionID]);
useEffect(() => {
if (!overviewFilter) return;