fixed section header mismatch

This commit is contained in:
Thibault Deckers 2020-01-17 18:00:21 +09:00
parent 6f31f03451
commit f5f13527fa

View file

@ -108,16 +108,18 @@ class SectionHeader extends StatelessWidget {
child: albumIcon, child: albumIcon,
); );
} }
var title = collection.getUniqueAlbumName(sectionKey as String, sections.keys.cast<String>());
header = TitleSectionHeader( header = TitleSectionHeader(
key: ValueKey(title),
leading: albumIcon, leading: albumIcon,
title: collection.getUniqueAlbumName(sectionKey as String, sections.keys.cast<String>()), title: title,
); );
break; break;
case GroupFactor.month: case GroupFactor.month:
header = MonthSectionHeader(date: sectionKey as DateTime); header = MonthSectionHeader(key: ValueKey(sectionKey), date: sectionKey as DateTime);
break; break;
case GroupFactor.day: case GroupFactor.day:
header = DaySectionHeader(date: sectionKey as DateTime); header = DaySectionHeader(key: ValueKey(sectionKey), date: sectionKey as DateTime);
break; break;
} }
} }