[gnome-software: 3/4] flatpak: Clear app sizes when it’s uninstalled




commit 6066f259dc8a3f452cb2e72e9cab6060557577d6
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon May 16 15:30:20 2022 +0100

    flatpak: Clear app sizes when it’s uninstalled
    
    When an app is uninstalled, its download size will likely change from
    zero to something non-zero, and its installed size will likely change
    to zero.
    
    Do that. They can be refined further later if the caller has requested
    size information.
    
    Spotted by Phaedrus Leeds in !1351.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 plugins/flatpak/gs-plugin-flatpak.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 4062146f2..241917bdc 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -1170,6 +1170,9 @@ gs_plugin_app_remove (GsPlugin *plugin,
        }
 
        /* get any new state */
+       gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0);
+       gs_app_set_size_installed (app, GS_SIZE_TYPE_UNKNOWN, 0);
+
        if (!gs_flatpak_refresh (flatpak, G_MAXUINT, interactive, cancellable, error)) {
                gs_flatpak_error_convert (error);
                return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]