Fix order of operations (#591)

This commit is contained in:
Oliver 2024-12-24 01:05:59 +11:00 committed by GitHub
parent 1a5992042a
commit f5e3b4ac80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -738,10 +738,10 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
Widget? _expiryIcon;
if (widget.item.stale) {
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
} else if (widget.item.expired) {
if (widget.item.expired) {
_expiryIcon = Text(L10().expiryExpired, style: TextStyle(color: COLOR_DANGER));
} else if (widget.item.stale) {
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
}
tiles.add(