mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Fix bug with missing year and add date to drag handle (#761)
This commit is contained in:
parent
96b9e37461
commit
87ca031335
3 changed files with 9 additions and 13 deletions
|
|
@ -22,16 +22,14 @@ class RenderAssetGridElement {
|
|||
final RenderAssetGridElementType type;
|
||||
final RenderAssetGridRow? assetRow;
|
||||
final String? title;
|
||||
final int? month;
|
||||
final int? year;
|
||||
final DateTime date;
|
||||
final List<AssetResponseDto>? relatedAssetList;
|
||||
|
||||
RenderAssetGridElement(
|
||||
this.type, {
|
||||
this.assetRow,
|
||||
this.title,
|
||||
this.month,
|
||||
this.year,
|
||||
required this.date,
|
||||
this.relatedAssetList,
|
||||
});
|
||||
}
|
||||
|
|
@ -51,7 +49,7 @@ final renderListProvider = StateProvider((ref) {
|
|||
if (lastDate == null || lastDate!.month != date.month) {
|
||||
elements.add(
|
||||
RenderAssetGridElement(RenderAssetGridElementType.monthTitle,
|
||||
title: groupName, month: date.month, year: date.year),
|
||||
title: groupName, date: date),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -60,8 +58,7 @@ final renderListProvider = StateProvider((ref) {
|
|||
RenderAssetGridElement(
|
||||
RenderAssetGridElementType.dayTitle,
|
||||
title: groupName,
|
||||
month: date.month,
|
||||
year: date.year,
|
||||
date: date,
|
||||
relatedAssetList: assets,
|
||||
),
|
||||
);
|
||||
|
|
@ -73,8 +70,7 @@ final renderListProvider = StateProvider((ref) {
|
|||
|
||||
final rowElement = RenderAssetGridElement(
|
||||
RenderAssetGridElementType.assetRow,
|
||||
month: date.month,
|
||||
year: date.year,
|
||||
date: date,
|
||||
assetRow: RenderAssetGridRow(
|
||||
assets.sublist(cursor, cursor + rowElements),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue