Skip to content

Add image overlay controller with favorite toggle for photo slider#196

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-context-menu-for-favorite-images
Draft

Add image overlay controller with favorite toggle for photo slider#196
Copilot wants to merge 3 commits intomainfrom
copilot/add-context-menu-for-favorite-images

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

When viewing images in the slider, there was no way to interact with an asset (e.g., mark as favorite). Videos already had an overlay controller; images had none.

Changes

MediaSlider submodule

  • Enter key on IMAGE now shows/hides an image controller overlay (previously toggled slideshow). Slideshow is paused when the overlay appears.
  • Back key dismisses the overlay; navigating to the next/prev asset also auto-dismisses it.
  • DPad Left/Right passes through to the focus system when the overlay is visible (allowing button-to-button navigation within the overlay).
  • Added isFavorite: Boolean to SliderItem with full Parcelable support.
  • Added onFavoriteToggle: (String, Boolean) -> Unit companion callback on MediaSliderConfiguration (same pattern as onAssetSelected).
  • New layouts/drawables: image_controller.xml (favorite + slideshow buttons), ic_favorite.xml, ic_favorite_border.xml.
  • isControllerVisible() now also returns true when the image overlay is visible (preserves screensaver dismiss behavior).

App

  • Asset gains isFavorite: Boolean = false; AssetUtil.toSliderItem() forwards it.
  • ApiService: new PUT assets/{id} endpoint via Retrofit.
  • ApiClient.updateFavorite(id, isFavorite) wraps the call.
  • ImmichMediaSlider sets MediaSliderConfiguration.onFavoriteToggle to call updateFavorite and show a toast on success/failure.
// Wired up in ImmichMediaSlider.onViewCreated before loadMediaSliderView()
MediaSliderConfiguration.onFavoriteToggle = { assetId, isFavorite ->
    lifecycleScope.launch {
        apiClient.updateFavorite(assetId, isFavorite).fold(
            ifLeft  = { /* show error toast */ },
            ifRight = { /* show success toast */ }
        )
    }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/gradle-daemon-main-8.9.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/agents/gradle-instrumentation-agent-8.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.9 (dns block)
    • Triggering command: /usr/bin/curl curl -s REDACTED grep -l (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx1536m (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 27, 2026 16:43
Co-authored-by: giejay <2014373+giejay@users.noreply.github.com>
Copilot AI changed the title [WIP] Add context menu for adding images to favorites or albums Add image overlay controller with favorite toggle for photo slider Mar 27, 2026
Copilot AI requested a review from giejay March 27, 2026 16:45
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.

[FR] I want to be able to add an image to favorite / an Album

2 participants