Simplify fix: only add isInt() check in refresh methods

Changed approach per maintainer feedback - instead of caching signal values,
just add isInt() check before accessing config_["signal"].asInt() in refresh()
methods. This is simpler and more minimal.

Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-04 08:57:08 +00:00
parent 74fb2f252f
commit 0a8b7b096a
4 changed files with 4 additions and 9 deletions

View File

@ -42,7 +42,6 @@ class Custom : public ALabel {
int pid_;
util::command::res output_;
util::JsonParser parser_;
int signal_; // Cached signal value (-1 = disabled) to avoid JSON access in signal handler
util::SleeperThread thread_;
};

View File

@ -33,7 +33,6 @@ class Image : public AModule {
int size_;
std::chrono::milliseconds interval_;
util::command::res output_;
int signal_; // Cached signal value (-1 = disabled) to avoid JSON access in signal handler
util::SleeperThread thread_;
};