From 0c8e8cab97be52961f50b8dc0e4d1f1069ec87e1 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Wed, 4 Jan 2023 20:06:19 +0100 Subject: [PATCH] Revert "Refresh product/chore/battery card only when actually visible" This reverts commit c934bfb7b383fa1b3014372640312a0dd93fac46. --- public/viewjs/components/batterycard.js | 5 ----- public/viewjs/components/chorecard.js | 5 ----- public/viewjs/components/productcard.js | 5 ----- 3 files changed, 15 deletions(-) diff --git a/public/viewjs/components/batterycard.js b/public/viewjs/components/batterycard.js index a0626745..6533628d 100644 --- a/public/viewjs/components/batterycard.js +++ b/public/viewjs/components/batterycard.js @@ -2,11 +2,6 @@ Grocy.Components.BatteryCard = {}; Grocy.Components.BatteryCard.Refresh = function(batteryId) { - if (!$(".batterycard").is(":visible")) - { - return; - } - Grocy.Api.Get('batteries/' + batteryId, function(batteryDetails) { diff --git a/public/viewjs/components/chorecard.js b/public/viewjs/components/chorecard.js index 4ccecf1d..ca4a38a1 100644 --- a/public/viewjs/components/chorecard.js +++ b/public/viewjs/components/chorecard.js @@ -2,11 +2,6 @@ Grocy.Components.ChoreCard = {}; Grocy.Components.ChoreCard.Refresh = function(choreId) { - if (!$(".chorecard").is(":visible")) - { - return; - } - Grocy.Api.Get('chores/' + choreId, function(choreDetails) { diff --git a/public/viewjs/components/productcard.js b/public/viewjs/components/productcard.js index 8adf1e74..dba979cc 100644 --- a/public/viewjs/components/productcard.js +++ b/public/viewjs/components/productcard.js @@ -2,11 +2,6 @@ Grocy.Components.ProductCard = {}; Grocy.Components.ProductCard.Refresh = function(productId) { - if (!$(".productcard").is(":visible")) - { - return; - } - Grocy.Api.Get('stock/products/' + productId, function(productDetails) {