mirror of
https://github.com/immich-app/immich.git
synced 2025-11-02 18:47:07 -05:00
fix: only cast to device if the asset is a RemoteAsset (#22805)
This commit is contained in:
parent
ea610760ee
commit
efa21af6f9
@ -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…
x
Reference in New Issue
Block a user