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(server, web): prevent reload when liking an asset #7589

Merged
merged 1 commit into from Mar 4, 2024

Conversation

martabal
Copy link
Member

@martabal martabal commented Mar 2, 2024

This PR prevents photo viewer from reloading when you like an asset

Copy link

cloudflare-pages bot commented Mar 2, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: afb51d4
Status: ✅  Deploy successful!
Preview URL: https://2bda9149.immich.pages.dev
Branch Preview URL: https://fix-favorite-and-archive.immich.pages.dev

View logs

@martabal martabal changed the title fix(server, web): prevent flickering when liking an asset fix(server, web): prevent reload when liking an asset Mar 2, 2024
@jrasm91
Copy link
Contributor

jrasm91 commented Mar 2, 2024

I think we should always send them since they will be sent eventually when a user can do those actions.

@martabal
Copy link
Member Author

martabal commented Mar 3, 2024

I think we should always send them since they will be sent eventually when a user can do those actions.

Currently, only owners can archive and favorite assets, but the day when we'll implement a mechanism so all users can like and/or archive assets, we'll have to update the backend and the frontend logic, so it's more maintenance.

And I don't really like the fact we're sending incorrect information.

e2e/vitest.config.ts Outdated Show resolved Hide resolved
@jrasm91
Copy link
Contributor

jrasm91 commented Mar 3, 2024

Sending false is not incorrect. The asset is not favorited by the user. It may change to true in the future in which case I don't think it makes sense to have deleted it from the response payload.

@jrasm91 jrasm91 merged commit 935ddf3 into main Mar 4, 2024
25 checks passed
@jrasm91 jrasm91 deleted the fix/favorite-and-archive branch March 4, 2024 22:41
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.

None yet

3 participants