Support work sections

This commit is contained in:
Elias Projahn 2020-05-13 20:52:25 +02:00
parent 813fa2e47a
commit 93a5a06b55
6 changed files with 134 additions and 51 deletions

View file

@ -61,6 +61,15 @@ class _PlayerBarState extends State<PlayerBar> {
if (_partIds.isNotEmpty) {
subtitleBuffer.write(': ');
final section = _workInfo.sections
.lastWhere((s) => s.beforePartIndex <= _partIds[0]);
if (section != null) {
subtitleBuffer.write(section.title);
subtitleBuffer.write(': ');
}
subtitleBuffer.write(
_partIds.map((i) => _workInfo.parts[i].part.title).join(', '));
}