mobile: Integrate with server

This commit is contained in:
Elias Projahn 2020-04-26 15:35:45 +02:00
parent 60a474ea56
commit c93ebf17a0
20 changed files with 751 additions and 740 deletions

View file

@ -152,6 +152,10 @@ class _PartTileState extends State<PartTile> {
}
}
/// Screen for editing a work.
///
/// If the user is finished editing, the result will be returned as a [WorkInfo]
/// object.
class WorkEditor extends StatefulWidget {
final Work work;
@ -319,12 +323,12 @@ class _WorkEditorState extends State<WorkEditor> {
));
}
await backend.db.updateWork(WorkData(
final workInfo = await backend.client.putWork(WorkData(
data: data,
partData: partData,
));
Navigator.pop(context, data.work);
Navigator.pop(context, workInfo);
},
),
],