2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-06 09:18:54 +00:00

Similar checks for other widgets

This commit is contained in:
Oliver Walters 2022-03-26 18:38:10 +11:00
parent 6d3ca0fa3d
commit 8ba4a9e678
2 changed files with 10 additions and 2 deletions

View File

@ -89,7 +89,11 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
// Update the category
if (category != null) {
await category!.reload();
final bool result = await category?.reload() ?? false;
if (!result) {
Navigator.of(context).pop();
}
}
// Request a list of sub-categories under this one

View File

@ -119,7 +119,11 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
// Reload location information
if (location != null) {
await location?.reload();
final bool result = await location?.reload() ?? false;
if (!result) {
Navigator.of(context).pop();
}
}
// Request a list of sub-locations under this one