forked from vikunja/app
error handling
This commit is contained in:
parent
068060ace5
commit
dfdd6bbd36
|
@ -301,7 +301,17 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
|||
);
|
||||
|
||||
// update the labels
|
||||
VikunjaGlobal.of(context).labelTaskBulkService.update(updatedTask, _labels);
|
||||
VikunjaGlobal.of(context).labelTaskBulkService.update(updatedTask, _labels).catchError((err) {
|
||||
setState(() => _loading = false);
|
||||
Scaffold.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Something went wrong: ' + err.toString()),
|
||||
action: SnackBarAction(
|
||||
label: 'CLOSE',
|
||||
onPressed: Scaffold.of(context).hideCurrentSnackBar),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
VikunjaGlobal.of(context).taskService.update(updatedTask).then((_) {
|
||||
setState(() => _loading = false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user