From 2b0208e88cfc6d3c9915344999f7f65701d3c538 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 7 Sep 2020 19:42:25 +0200 Subject: [PATCH] Fix toggle for header-clock I'm not 100% sure why, but with this change, the listener which calls `CheckHeaderClockEnabled` will be invoked *before* the listener which persists the setting. If the setting is persisted before that, the clock doesn't show up when enabling it in the settings-menu and appears/disappears in the exact opposite way the setting is true/false. --- public/js/grocy_clock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/grocy_clock.js b/public/js/grocy_clock.js index efa13886..2299c5b0 100644 --- a/public/js/grocy_clock.js +++ b/public/js/grocy_clock.js @@ -1,4 +1,4 @@ -$("#show-clock-in-header").on("change", function() +$(document).on("change", "#show-clock-in-header", function() { CheckHeaderClockEnabled(); });