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




commit 2a52e8d7834e4eeca44b7c7a5f421ef495dcc351
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]