mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: only cast to device if the asset is a RemoteAsset (#22805)
This commit is contained in:
parent
3cd84cb9f8
commit
4f35e594e0
1 changed files with 2 additions and 4 deletions
|
|
@ -221,10 +221,8 @@ class _AssetViewerState extends ConsumerState<AssetViewer> {
|
|||
context.scaffoldMessenger.hideCurrentSnackBar();
|
||||
|
||||
// send image to casting if the server has it
|
||||
if (asset.hasRemote) {
|
||||
final remoteAsset = asset as RemoteAsset;
|
||||
|
||||
ref.read(castProvider.notifier).loadMedia(remoteAsset, false);
|
||||
if (asset is RemoteAsset) {
|
||||
ref.read(castProvider.notifier).loadMedia(asset, false);
|
||||
} else {
|
||||
// casting cannot show local assets
|
||||
context.scaffoldMessenger.clearSnackBars();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue