mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 20:16:25 +00:00
Similar checks for other widgets
This commit is contained in:
parent
6d3ca0fa3d
commit
8ba4a9e678
2 changed files with 10 additions and 2 deletions
|
|
@ -89,7 +89,11 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||||
|
|
||||||
// Update the category
|
// Update the category
|
||||||
if (category != null) {
|
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
|
// Request a list of sub-categories under this one
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,11 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||||
|
|
||||||
// Reload location information
|
// Reload location information
|
||||||
if (location != null) {
|
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
|
// Request a list of sub-locations under this one
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue