[gnome-software/1364-implement-other-apps-by-author-section-in-app-details-page: 14/14] gs-shell: Let the 'Back' button go back in the Details page




commit 3d444b47f01e59d6fb46ac2aa2802b06a47e5e96
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 15 18:23:44 2022 +0100

    gs-shell: Let the 'Back' button go back in the Details page
    
    The 'Back' button checks whether it can go back within the Details
    page and only if there was no previous app there, it goes back through
    its own back stack.

 src/gs-shell.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index ff2a142ed..0da47aefd 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -789,6 +789,10 @@ gs_shell_go_back (GsShell *shell)
 {
        BackEntry *entry;
 
+       if (gs_shell_get_mode (shell) == GS_SHELL_MODE_DETAILS &&
+           gs_details_page_go_back (GS_DETAILS_PAGE (GS_DETAILS_PAGE (shell->pages[GS_SHELL_MODE_DETAILS]))))
+               return;
+
        /* nothing to do */
        if (g_queue_is_empty (shell->back_entry_stack)) {
                g_debug ("no back stack, showing overview");


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