From a01ca583eaeded6f45bc3213cc1fff47b7263386 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Thu, 7 May 2026 18:50:04 +0000 Subject: [PATCH] fix: skip price fetch on first render when smart data empty; bump header to v1.7.4 --- assets/js/app.js | 5 +++++ index.html | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index e6f77dc..04fb525 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -10012,6 +10012,11 @@ async function renderShoppingItems() { if (fetchBtn2) fetchBtn2.disabled = false; if (refreshBtn2) { refreshBtn2.disabled = false; refreshBtn2.textContent = '🔄'; } _updateDashboardPriceTotal(); + } else if (smartShoppingItems.length === 0 && _smartShoppingLastFetch === 0) { + // Smart data hasn't loaded yet — don't trigger fetch now. + // The second renderShoppingItems() call (inside loadSmartShopping().then()) will handle prices + // once we have real qty/unit data. Just apply whatever is cached silently. + _applyPriceBadgesFromCache(); } else { // Immediately apply any prices already fetched this session — no flicker for cached items _applyPriceBadgesFromCache(); diff --git a/index.html b/index.html index 841ea56..f08ba4d 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@

- EverShelfv1.7.3 + EverShelfv1.7.4

@@ -1461,6 +1461,6 @@
- +