mirror of
https://github.com/immich-app/immich.git
synced 2024-12-23 02:06:15 +02:00
1633af7af6
* introduce Asset as composition of AssetResponseDTO and AssetEntity * filter out duplicate assets (that are both local and remote, take only remote for now) * only allow remote images to be added to albums * introduce ImmichImage to render Asset using local or remote data * optimized deletion of local assets * local video file playback * allow multiple methods to wait on background service finished * skip local assets when adding to album from home screen * fix and optimize delete * show gray box placeholder for local assets * add comments * fix bug: duplicate assets in state after onNewAssetUploaded
27 lines
884 B
Dart
27 lines
884 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/modules/album/ui/selection_thumbnail_image.dart';
|
|
import 'package:immich_mobile/shared/models/asset.dart';
|
|
|
|
class AssetGridByMonth extends HookConsumerWidget {
|
|
final List<Asset> assetGroup;
|
|
const AssetGridByMonth({Key? key, required this.assetGroup})
|
|
: super(key: key);
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
return SliverGrid(
|
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
crossAxisCount: 4,
|
|
crossAxisSpacing: 5.0,
|
|
mainAxisSpacing: 5,
|
|
),
|
|
delegate: SliverChildBuilderDelegate(
|
|
(BuildContext context, int index) {
|
|
return SelectionThumbnailImage(asset: assetGroup[index]);
|
|
},
|
|
childCount: assetGroup.length,
|
|
),
|
|
);
|
|
}
|
|
}
|