mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +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)
|
||||
.sortedBySelf()
|
||||
.reversed
|
||||
.groupBy(key: (e) => e)
|
||||
.map((key, value) =>
|
||||
.groupBy(key: (e) {
|
||||
if (prefController.homePhotosZoomLevelValue >= 0) {
|
||||
return e;
|
||||
} else {
|
||||
// month
|
||||
return Date(e.year, e.month);
|
||||
}
|
||||
}).map((key, value) =>
|
||||
MapEntry(key, (value.length / state.itemPerRow!).ceil()));
|
||||
final totalRows = dateRows.values.sum;
|
||||
final midRow = totalRows / 2;
|
||||
|
|
Loading…
Reference in a new issue