[gnome-software/630-flatpak-updates-are-stuck-in-installing-state-when-flatpak-update-was-already-done-outside] flatpak: Refresh UI after changes made outside of Software
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/630-flatpak-updates-are-stuck-in-installing-state-when-flatpak-update-was-already-done-outside] flatpak: Refresh UI after changes made outside of Software
- Date: Wed, 3 Mar 2021 11:21:12 +0000 (UTC)
commit 06319f667d6e198364fdf5990fe2940d92b49793
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 3 12:18:38 2021 +0100
flatpak: Refresh UI after changes made outside of Software
When the flatpak installation monitor claims it changed in the background,
the memory plugin cache of the GsApp should be discarded and the information
about installed/to-be-updated applications refreshed as well. The UI should
be reloaded, to reflect the actual state, instead of showing stale data, aka
the GsApp, which had been in the cache.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/630
plugins/flatpak/gs-flatpak.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 128ba46b7..fb7536b3f 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -418,6 +418,10 @@ gs_plugin_flatpak_changed_cb (GFileMonitor *monitor,
/* drop the remote title cache */
locker = g_mutex_locker_new (&self->remote_title_mutex);
g_hash_table_remove_all (self->remote_title);
+ g_clear_pointer (&locker, g_mutex_locker_free);
+
+ gs_plugin_cache_invalidate (self->plugin);
+ gs_plugin_reload (self->plugin);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]