modules: systemd_failed_units: Move nr_failed calculation to updateData
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
This commit is contained in:
@ -97,12 +97,12 @@ void SystemdFailedUnits::updateData() {
|
|||||||
if (user_proxy) {
|
if (user_proxy) {
|
||||||
nr_failed_user = load("user", user_proxy);
|
nr_failed_user = load("user", user_proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nr_failed = nr_failed_system + nr_failed_user;
|
||||||
dp.emit();
|
dp.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto SystemdFailedUnits::update() -> void {
|
auto SystemdFailedUnits::update() -> void {
|
||||||
nr_failed = nr_failed_system + nr_failed_user;
|
|
||||||
|
|
||||||
// Hide if needed.
|
// Hide if needed.
|
||||||
if (nr_failed == 0 && hide_on_ok) {
|
if (nr_failed == 0 && hide_on_ok) {
|
||||||
event_box_.set_visible(false);
|
event_box_.set_visible(false);
|
||||||
|
Reference in New Issue
Block a user