diff --git a/frontend/src/components/gallery/PhotoLightbox.tsx b/frontend/src/components/gallery/PhotoLightbox.tsx index 84f0052c..56d62400 100644 --- a/frontend/src/components/gallery/PhotoLightbox.tsx +++ b/frontend/src/components/gallery/PhotoLightbox.tsx @@ -288,6 +288,11 @@ export const PhotoLightbox: React.FC = ({ setLikeCount(c => Math.max(0, c + (next ? 1 : -1))); return next; }); + // Keep the gallery's photo list (like_count drives the feedback + // filter chips) in sync — the guest-mode path above already does + // this; without it, likes made in the lightbox don't appear in + // the Likes filter until a full page reload. + if (onFeedbackChange) onFeedbackChange(); } catch (err) { if (handleLimitError(err)) return; // eslint-disable-next-line no-console @@ -342,6 +347,9 @@ export const PhotoLightbox: React.FC = ({ setAvgRating(Number(fresh.summary?.average_rating) || 0); setTotalRatings(Number(fresh.summary?.total_ratings) || 0); } catch {} + // Sync gallery photo list so the Rated filter reflects this rating + // without a reload (parity with the guest-mode path above). + if (onFeedbackChange) onFeedbackChange(); }; const goToPrevious = () => { @@ -1010,6 +1018,9 @@ export const PhotoLightbox: React.FC = ({ }); setMyRating(pendingAction.rating); } + // Sync gallery photo list (feedback filter chips) — parity with + // the direct submit paths. + if (onFeedbackChange) onFeedbackChange(); setPendingAction(null); }} feedbackType={pendingAction?.type === 'rating' ? 'rating' : 'like'}