fix: upower hidded on start

This commit is contained in:
Alex 2023-10-17 20:12:24 +02:00
parent 208928ded5
commit 5319cb6e10
1 changed files with 6 additions and 1 deletions

View File

@ -289,7 +289,12 @@ auto UPower::update() -> void {
std::lock_guard<std::mutex> guard(m_Mutex);
// Don't update widget if the UPower service isn't running
if (!upowerRunning) return;
if (!upowerRunning) {
if (hideIfEmpty) {
event_box_.set_visible(false);
}
return;
}
UpDeviceKind kind;
UpDeviceState state;