mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 09:59:44 +00:00
Re-match devices when the AppStream metadata is updated
This allows us to notify clients watching for the 'supported' property for new devices added to the LVFS.
This commit is contained in:
parent
422e866bc8
commit
dde7a2f6e6
@ -84,6 +84,8 @@ typedef struct {
|
||||
FuProvider *provider;
|
||||
} FuDeviceItem;
|
||||
|
||||
static gboolean fu_main_get_updates_item_update (FuMainPrivate *priv, FuDeviceItem *item);
|
||||
|
||||
/**
|
||||
* fu_main_emit_changed:
|
||||
**/
|
||||
@ -1103,8 +1105,10 @@ fu_main_store_delay_cb (gpointer user_data)
|
||||
AsApp *app;
|
||||
GPtrArray *apps;
|
||||
guint i;
|
||||
FuDeviceItem *item;
|
||||
FuMainPrivate *priv = (FuMainPrivate *) user_data;
|
||||
|
||||
/* print what we've got */
|
||||
apps = as_store_get_apps (priv->store);
|
||||
if (apps->len == 0) {
|
||||
g_debug ("no devices in store");
|
||||
@ -1117,6 +1121,14 @@ fu_main_store_delay_cb (gpointer user_data)
|
||||
as_app_get_name (app, NULL));
|
||||
}
|
||||
}
|
||||
|
||||
/* are any devices now supported? */
|
||||
for (i = 0; i < priv->devices->len; i++) {
|
||||
item = g_ptr_array_index (priv->devices, i);
|
||||
if (fu_main_get_updates_item_update (priv, item))
|
||||
fu_main_emit_device_changed (priv, item->device);
|
||||
}
|
||||
|
||||
priv->store_changed_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user