Skip to content

Conversation

@JobiJoba
Copy link
Contributor

@JobiJoba JobiJoba commented Jun 2, 2025

Description

Fix issue #18628

I've modified the timeline interface to accept a user Id then modify the timeline repository to check on the user id.
I took the user id in the service which pass down to the repository.

I copy the same behavior than for Favorite but adapted for videos

@override
  Stream<RenderList> watchFavoriteTimeline(String userId) {
    final query = db.assets
        .where()
        .ownerIdEqualToAnyChecksum(fastHash(userId))
        .filter()
        .isFavoriteEqualTo(true)
        .not()
        .visibilityEqualTo(AssetVisibilityEnum.locked)
        .isTrashedEqualTo(false)
        .sortByFileCreatedAtDesc();

    return _watchRenderList(query, GroupAssetsBy.none);
  }

How Has This Been Tested?

  • Create an account with one video
  • Create another account with one video
  • Make them partners
  • Check if the videos of partner 2 in the quick links (NO)
  • Check if videos of the owner is in the quick links (YES)

Screenshots / Videos

Here is a video of the working state of the PR

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-06-02.at.14.38.31.mp4

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/)

…deosTimeline and modify the query in the repository
@alextran1502 alextran1502 merged commit d48702f into immich-app:main Jun 2, 2025
45 of 46 checks passed
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
…mich-app#18855)

Add userId to the contact of the timeline interface method watchAllVideosTimeline and modify the query in the repository
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.

2 participants