mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: prefer remote images in new timeline (#22452)
fix: prefer remote images in new thumbnail Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
cdbe1d7f10
commit
bea116e1b9
2 changed files with 5 additions and 27 deletions
|
|
@ -5,7 +5,6 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/images/image_provider.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/images/local_image_provider.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/images/thumb_hash_provider.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/timeline/constants.dart';
|
||||
|
|
@ -39,14 +38,7 @@ class Thumbnail extends StatefulWidget {
|
|||
),
|
||||
_ => null,
|
||||
},
|
||||
imageProvider = switch (asset) {
|
||||
RemoteAsset() =>
|
||||
asset.localId == null
|
||||
? RemoteThumbProvider(assetId: asset.id)
|
||||
: LocalThumbProvider(id: asset.localId!, size: size, assetType: asset.type),
|
||||
LocalAsset() => LocalThumbProvider(id: asset.id, size: size, assetType: asset.type),
|
||||
_ => null,
|
||||
};
|
||||
imageProvider = asset == null ? null : getThumbnailImageProvider(asset, size: size);
|
||||
|
||||
@override
|
||||
State<Thumbnail> createState() => _ThumbnailState();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue