Skip to content

feat: add favorite button to DriftMemory widget#28271

Open
luckydevil13 wants to merge 1 commit into
immich-app:mainfrom
luckydevil13:Like_button_on_DriftMemoryBottomInfo
Open

feat: add favorite button to DriftMemory widget#28271
luckydevil13 wants to merge 1 commit into
immich-app:mainfrom
luckydevil13:Like_button_on_DriftMemoryBottomInfo

Conversation

@luckydevil13
Copy link
Copy Markdown

@luckydevil13 luckydevil13 commented May 6, 2026

Description

Adds a favorite (like) button to the DriftMemoryBottomInfo widget in the mobile app. When viewing a drift memory, users can now toggle the favorite status of the currently displayed asset directly from the bottom info bar, without leaving the memory view.

The widget was converted from StatelessWidget to ConsumerWidget to support Riverpod state management. The favorite button is only shown when the current user owns the asset (i.e., RemoteAsset with matching ownerId), and it correctly updates both the asset viewer state and the in-memory asset list.

How Has This Been Tested?

  • Verified favorite button appears for own remote assets and is hidden for others' assets
  • Tapped favorite button to add asset to favorites — icon turns red
  • Tapped again to remove from favorites — icon returns to outline
  • Confirmed state stays synced after navigating away and returning

Screenshots (if appropriate)

photo_2026-05-07_20-21-12

Checklist:

  • I have carefully read CONTRIBUTING.md
  • 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/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

An LLM was used to assist with writing the initial implementation code for the favorite button logic in DriftMemoryBottomInfo.

@luckydevil13 luckydevil13 marked this pull request as draft May 6, 2026 18:02
@luckydevil13
Copy link
Copy Markdown
Author

Could a maintainer please add the changelog:mobile label to this PR?

@luckydevil13 luckydevil13 marked this pull request as ready for review May 6, 2026 18:05
@alextran1502
Copy link
Copy Markdown
Member

Thanks for the PR. We also have the mechanism to favorite a memory, which is currently displayed on the web as shown below

image

If we introduce this favorite button and its behavior differs from the web, it can be confusing. Do you have any proposals for making them more intuitive?

@luckydevil13 luckydevil13 changed the title feat: add favorite button to DriftMemoryBottomInfo widget feat: add favorite button to DriftMemory widget May 7, 2026
@luckydevil13
Copy link
Copy Markdown
Author

luckydevil13 commented May 7, 2026

@alextran1502 , alight to web implementation:

  • move favorite button to top-right corner
  • white infill color
photo_2026-05-07_20-21-12

@luckydevil13 luckydevil13 force-pushed the Like_button_on_DriftMemoryBottomInfo branch from 7e586e2 to 34c1d6b Compare May 7, 2026 17:35
@luckydevil13 luckydevil13 force-pushed the Like_button_on_DriftMemoryBottomInfo branch from 543c4c4 to 34c1d6b Compare May 7, 2026 17:41
@shenlong-tanwen
Copy link
Copy Markdown
Member

@luckydevil13 The favourite button on the web saves the memory, i.e, updates the isSaved field on the memory and does not favourite the asset and the difference between the web and mobile might confuse the users is what @alextran1502 meant. The change looks good, but if we want to favourite the asset displayed on the memory and not the memory itself, we might need to find a way for both of the features to exist together

@luckydevil13
Copy link
Copy Markdown
Author

luckydevil13 commented May 8, 2026

@shenlong-tanwen @alextran1502 do I miss something...

For Web

  1. Every day the server generates "on this day" memories from past years
  2. They're shown only today
  3. After 30 days they're deleted from the DB (not the photos, just the grouping)
  4. isSaved = true means the grouping won't be deleted, it survives cleanup

What the user sees visually:

  • Heart icon is filled or outlined - that's it? nothing more?
  • Next year on the same day the server will recreate the memory from the same photos anyway, so the difference is minimal
    Conclusion: the isSaved flag is a pretty narrow feature. Visually it only affects the button icon. The practical benefit is questionable since memories are regenerated every year anyway.

And we need to deside

  • Replace save memory with favorite (on web)
  • Or add two separate buttons

@alextran1502
Copy link
Copy Markdown
Member

  • The heart icon on the memory on the web is for favoriting the memory.
  • The heart icon you added on the mobile app is for favoriting an asset.

I think you might have thought that the heart icon on the memory page on the web also favoriting an asset

@luckydevil13
Copy link
Copy Markdown
Author

@alextran1502 thanks,

What is scenario with favoriting the memory? for me it's strage to have two "favorites", I've expect ❤️ is favorites

@alextran1502
Copy link
Copy Markdown
Member

@luckydevil13 We plan to introduce a memories view where the favorite memories can be filted or displayed on top

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.

4 participants