mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-31 11:00:06 +01:00
daemon: Only refresh batteries when the "online" state changes
There is no need to refresh batteries if we just re-read the status of a
line power supply without actually seeing a change ("online" vs.
"update-time" property).
Fixes: #184
This commit is contained in:
parent
4cccf81cad
commit
b4e9cd9739
1 changed files with 1 additions and 1 deletions
|
|
@ -788,7 +788,7 @@ up_daemon_device_changed_cb (UpDevice *device, GParamSpec *pspec, UpDaemon *daem
|
|||
g_object_get (device,
|
||||
"type", &type,
|
||||
NULL);
|
||||
if (type == UP_DEVICE_KIND_LINE_POWER) {
|
||||
if (type == UP_DEVICE_KIND_LINE_POWER && g_strcmp0 (prop, "online") == 0) {
|
||||
/* refresh now */
|
||||
up_daemon_refresh_battery_devices (daemon);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue