[gnome-software/985-gs-installed-page-filter-out-uninstalled-local-applications: 21/21] gs-installed-page: Filter out uninstalled local applications




commit fe68f1923bdefd7aed5809e4e0aabacb2d19c096
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jan 26 16:02:28 2021 +0100

    gs-installed-page: Filter out uninstalled local applications
    
    The usual state after cancelled install is "available", but local
    packages have the state changed to "local", which was not in the list
    of "states to remove the application row due". Rather than adding
    the "local" state to the list name only allowed states in the list.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/985

 src/gs-installed-page.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 1fd8a843..b090690e 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -115,9 +115,12 @@ gs_installed_page_invalidate_sort_idle (gpointer user_data)
 
        gtk_list_box_row_changed (GTK_LIST_BOX_ROW (app_row));
 
-       /* if the app has been uninstalled (which can happen from another view)
-        * we should removed it from the installed view */
-       if (state == GS_APP_STATE_AVAILABLE || state == GS_APP_STATE_UNKNOWN)
+       /* Filter which applications can be shown in the installed page */
+       if (state != GS_APP_STATE_INSTALLING &&
+           state != GS_APP_STATE_INSTALLED &&
+           state != GS_APP_STATE_REMOVING &&
+           state != GS_APP_STATE_UPDATABLE &&
+           state != GS_APP_STATE_UPDATABLE_LIVE)
                gs_installed_page_unreveal_row (app_row);
 
        g_object_unref (app_row);


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