mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-09 11:48:02 +02:00
reresh the object before we calculate the id, else we fail and do not get history
This commit is contained in:
parent
c464646932
commit
25b89e99c3
1 changed files with 3 additions and 2 deletions
|
|
@ -409,14 +409,15 @@ dkp_supply_coldplug (DkpDevice *device)
|
|||
obj->type = DKP_DEVICE_TYPE_BATTERY;
|
||||
}
|
||||
|
||||
/* coldplug values */
|
||||
dkp_supply_refresh (device);
|
||||
|
||||
/* get the id so we can load the old history */
|
||||
id = dkp_object_get_id (obj);
|
||||
if (id != NULL)
|
||||
dkp_history_set_id (supply->priv->history, id);
|
||||
g_free (id);
|
||||
|
||||
/* coldplug */
|
||||
dkp_supply_refresh (device);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue