common, mobile: Adapt to new work part API

This commit is contained in:
Elias Projahn 2020-05-13 19:27:57 +02:00
parent 9bd0348f35
commit 813fa2e47a
5 changed files with 83 additions and 76 deletions

View file

@ -190,7 +190,7 @@ class _WorkEditorState extends State<WorkEditor> {
for (final partInfo in widget.workInfo.parts) {
parts.add(PartData(
title: partInfo.work.title,
title: partInfo.part.title,
composer: partInfo.composer,
instruments: List.from(partInfo.instruments),
));
@ -276,7 +276,7 @@ class _WorkEditorState extends State<WorkEditor> {
for (var i = 0; i < parts.length; i++) {
final part = parts[i];
partInfos.add(PartInfo(
work: Work(
part: WorkPart(
id: generateId(),
title: part.titleController.text,
composer: part.composer?.id,