[gnome-software/gnome-3-30] Fix apps that were previously uninstalled from not showing on reinstall.



commit 6603fbe0aa7159dc547ccd6d6dbb46de550bf0bc
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Jul 29 16:11:51 2019 -0400

    Fix apps that were previously uninstalled from not showing on reinstall.
    
    When an app is uninstalled the app row on the installed apps page does an
    unreveal animation. The signal to detect the completion of this animation
    is connected after it is initiated. If the animation occurs immediately
    (e.g. the page is not visible) then the signal is missed. When the app is
    reinstalled the row is there but not visible and G-S does nothing.
    
    To reproduce:
    1. Open GNOME Software
    2. Go to installed tab
    3. Click on an installed app
    4. Remove this app
    5. Install this app
    6. Click back button to return to Installed page.
    
    Expected result:
    App is shown in the Installed page.
    
    Observed result:
    App is not shown in the Installed page.
    
    Solved by connecting the signal handler before the unreveal.
    
    A low risk bug could remain that a user installs the app again before the
    unreveal animation completes, thus the row is removed even though the
    apps is installed. This seems unlikely due to apps taking time to install.

 src/gs-installed-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index b388a30a..45e106a9 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -103,9 +103,9 @@ row_unrevealed (GObject *row, GParamSpec *pspec, gpointer data)
 static void
 gs_installed_page_unreveal_row (GsAppRow *app_row)
 {
-       gs_app_row_unreveal (app_row);
        g_signal_connect (app_row, "unrevealed",
                          G_CALLBACK (row_unrevealed), NULL);
+       gs_app_row_unreveal (app_row);
 }
 
 static void


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