Message hides after update fails
This commit is contained in:
parent
d2d674003d
commit
c15f4c3f79
|
|
@ -154,13 +154,19 @@ class _UpdateDialogState extends State<UpdateDialog> {
|
||||||
updateState = UpdateState.done;
|
updateState = UpdateState.done;
|
||||||
updateResponse = response.body;
|
updateResponse = response.body;
|
||||||
});
|
});
|
||||||
if (kIsWeb) {
|
|
||||||
WebUtils.reloadBrowser();
|
final String message = jsonDecode(response.body)['message'];
|
||||||
|
if (message.contains('failed')) {
|
||||||
|
// do nothing
|
||||||
} else {
|
} else {
|
||||||
store.dispatch(RefreshData(
|
if (kIsWeb) {
|
||||||
clearData: true,
|
WebUtils.reloadBrowser();
|
||||||
includeStatic: true,
|
} else {
|
||||||
));
|
store.dispatch(RefreshData(
|
||||||
|
clearData: true,
|
||||||
|
includeStatic: true,
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catchError((dynamic error) {
|
}).catchError((dynamic error) {
|
||||||
showErrorDialog(context: context, message: '$error');
|
showErrorDialog(context: context, message: '$error');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue