Show loading overlay for "toggle star" operation (#192)

* Show loading overlay for "toggle star" operation

* Improve loading speed of PartDetail widget

* Improve loading of StockDetail widget
This commit is contained in:
Oliver 2022-07-29 19:30:22 +10:00 committed by GitHub
parent e13817abed
commit f652bebd83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 12 deletions

View file

@ -129,11 +129,16 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
});
});
attachmentCount = await InvenTreeStockItemAttachment().count(
// Request the number of attachments
InvenTreeStockItemAttachment().count(
filters: {
"stock_item": item.pk.toString()
}
);
).then((int value) {
setState(() {
attachmentCount = value;
});
});
// Request information on labels available for this stock item
if (InvenTreeAPI().pluginsEnabled()) {