Refresh product/chore/battery card only when actually visible

This commit is contained in:
Bernd Bestel
2022-12-26 20:22:38 +01:00
parent 76500c57bd
commit c934bfb7b3
3 changed files with 15 additions and 0 deletions

View File

@@ -2,6 +2,11 @@ Grocy.Components.ChoreCard = {};
Grocy.Components.ChoreCard.Refresh = function(choreId)
{
if (!$(".chorecard").is(":visible"))
{
return;
}
Grocy.Api.Get('chores/' + choreId,
function(choreDetails)
{