mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-08 18:28:53 +01:00
Fix scroll bar label showing wrong date if timeline grouped by month
This commit is contained in:
parent
20120ea90d
commit
5be72240c5
1 changed files with 8 additions and 2 deletions
|
@ -381,8 +381,14 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
||||||
.map((e) => e.date)
|
.map((e) => e.date)
|
||||||
.sortedBySelf()
|
.sortedBySelf()
|
||||||
.reversed
|
.reversed
|
||||||
.groupBy(key: (e) => e)
|
.groupBy(key: (e) {
|
||||||
.map((key, value) =>
|
if (prefController.homePhotosZoomLevelValue >= 0) {
|
||||||
|
return e;
|
||||||
|
} else {
|
||||||
|
// month
|
||||||
|
return Date(e.year, e.month);
|
||||||
|
}
|
||||||
|
}).map((key, value) =>
|
||||||
MapEntry(key, (value.length / state.itemPerRow!).ceil()));
|
MapEntry(key, (value.length / state.itemPerRow!).ceil()));
|
||||||
final totalRows = dateRows.values.sum;
|
final totalRows = dateRows.values.sum;
|
||||||
final midRow = totalRows / 2;
|
final midRow = totalRows / 2;
|
||||||
|
|
Loading…
Reference in a new issue