[PR #23400] [MERGED] fix: button condition rendering #17524

Closed
opened 2026-02-05 16:23:22 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/23400
Author: @alextran1502
Created: 10/31/2025
Status: Merged
Merged: 10/31/2025
Merged by: @alextran1502

Base: mainHead: fix-button-condition-rendering


📝 Commits (1)

  • f62a2d7 fix: button condition rendering

📊 Changes

2 files changed (+19 additions, -5 deletions)

View changed files

📝 mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart (+18 -4)
📝 mobile/lib/utils/action_button.utils.dart (+1 -1)

📄 Description

Fixes an issue where opening the detail panel in On this device view of an asset that is merged triggers an error.

@shenlong-tanwen @bwees FYI, when an asset.hasRemote is true the type can either be RemoteAsset or LocalAsset, each type has different remote ID property, remoteAsset.id and localAsset.remoteAssetId, so if we check for hasRemote condition, we have to further check for the type to correctly get the remote asset id for the corresponding case.

I think this will need to be simplified somehow because checking getter value then checking type is getting confusing easily and error prone


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/23400 **Author:** [@alextran1502](https://github.com/alextran1502) **Created:** 10/31/2025 **Status:** ✅ Merged **Merged:** 10/31/2025 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix-button-condition-rendering` --- ### 📝 Commits (1) - [`f62a2d7`](https://github.com/immich-app/immich/commit/f62a2d7363ad2f5953057997a8ef4aa36ed069c2) fix: button condition rendering ### 📊 Changes **2 files changed** (+19 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart` (+18 -4) 📝 `mobile/lib/utils/action_button.utils.dart` (+1 -1) </details> ### 📄 Description Fixes an issue where opening the detail panel in On this device view of an asset that is merged triggers an error. @shenlong-tanwen @bwees FYI, when an `asset.hasRemote` is true the type can either be `RemoteAsset` or `LocalAsset`, each type has different remote ID property, `remoteAsset.id` and `localAsset.remoteAssetId`, so if we check for hasRemote condition, we have to further check for the type to correctly get the remote asset id for the corresponding case. I think this will need to be simplified somehow because checking getter value then checking type is getting confusing easily and error prone --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:23:22 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#17524