Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): folder view navigation refresh #16492

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yiningliu1
Copy link

@yiningliu1 yiningliu1 commented Mar 2, 2025

Description

In the gallery-viewer component in the web directory, I saved the "currentViewAssetIndex" variable to localStorage whenever it was changed and set the variable to the value in localStorage upon page load (if it exists).

This change fixes a bug, where upon loading the page while navigating between images in folder view, the currentViewAssetIndex would be set to 0 by default, so using the right/left arrows to navigate between images results in the wrong ones.

Fixes #15222

How Has This Been Tested?

I went to folder view opened up images at varying positions, navigated between them, and deleted them, refreshing the page after each action to check if I continue at the proper index. I also checked navigation on other views to ensure these changes did not break them

Screenshots (if appropriate)

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services)

Copy link
Contributor

github-actions bot commented Mar 2, 2025

Label error. Requires exactly 1 of: changelog:.*. Found: . A maintainer will add the required label.

@yiningliu1 yiningliu1 changed the title Fix folder view navigation refresh fix: folder view navigation refresh Mar 2, 2025
@yiningliu1 yiningliu1 changed the title fix: folder view navigation refresh fix(web): folder view navigation refresh Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After opening an image from the folder view and reloading the page, navigation no longer works correctly
1 participant