Skip to content

Conversation

@ChrAlpha
Copy link
Member

This PR change now derives the target index from getFilteredPhotos(), which mirrors the photo list that usePhotoViewer consumes. Previously, the index came from photoLoader.getPhotos() (the unfiltered master list), so opening the viewer after URL-driven filters could point to the wrong photo.

Kapture.2025-11-20.at.12.26.12.mp4

This PR edit keeps viewer state aligned with the filtered gallery and prevents mismatched indices.

Kapture.2025-11-20.at.12.28.02.mp4

Copilot AI review requested due to automatic review settings November 20, 2025 04:31
@safedep
Copy link

safedep bot commented Nov 20, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@vercel
Copy link

vercel bot commented Nov 20, 2025

@ChrAlpha is attempting to deploy a commit to the innei-dev Team on Vercel.

A member of the Team first needs to authorize it.

Copilot finished reviewing on behalf of ChrAlpha November 20, 2025 04:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the photo viewer logic to use filtered photos when opening a specific photo from a URL. Previously, the viewer index was calculated from the unfiltered master photo list, causing the wrong photo to display when URL-driven filters were active.

Key Changes:

  • Removed unused photoLoader import after transitioning to getFilteredPhotos()
  • Reordered photo viewer opening to occur after filter state is set, ensuring filters are applied before index calculation
  • Changed from photoLoader.getPhotos() to getFilteredPhotos() for index calculation, aligning with the filtered photo list used by the viewer

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Innei Innei merged commit 5f03285 into Afilmory:main Nov 23, 2025
2 of 4 checks passed
@ChrAlpha ChrAlpha deleted the fix/filtered-viewer-opening branch November 24, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants