hotfix for update_freq = 0 with forced refresh

This commit is contained in:
FelixKratz 2021-08-28 19:57:22 +02:00
parent 6d3469405b
commit 17144d3940

View file

@ -55,7 +55,7 @@ void bar_item_init(struct bar_item* bar_item, struct bar_item* default_item) {
} }
void bar_item_script_update(struct bar_item* bar_item, bool forced) { void bar_item_script_update(struct bar_item* bar_item, bool forced) {
if (!bar_item->enabled || bar_item->update_frequency == 0) return; if (!bar_item->enabled || (bar_item->update_frequency == 0 && !forced)) return;
if (strcmp(bar_item->script, "") != 0) { if (strcmp(bar_item->script, "") != 0) {
bar_item->counter++; bar_item->counter++;
if (bar_item->update_frequency < bar_item->counter || forced) { if (bar_item->update_frequency < bar_item->counter || forced) {