From 24a5bad48dd449d9ea3a37ee78e4b6cfdc96e3e7 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 19 Nov 2018 00:07:12 -0200 Subject: [PATCH] panel-list: Fix back button after search This is a fallout from commit b02bc2a935f. It was missing the check for search. --- shell/cc-panel-list.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c index 8b9b98199..17899d44e 100644 --- a/shell/cc-panel-list.c +++ b/shell/cc-panel-list.c @@ -966,13 +966,16 @@ cc_panel_list_go_previous (CcPanelList *self) * Main → Details or Devices → Widget * * to + * * Main → Details or Devices * + * A similar situation may happen with search. + * * To avoid a loop (Details or Devices → Widget → Details or Devices → ...), * make sure to go back to the main view when the current view is details or * devices. */ - if (previous_view == CC_PANEL_LIST_WIDGET) + if (previous_view == CC_PANEL_LIST_WIDGET || previous_view == CC_PANEL_LIST_SEARCH) previous_view = CC_PANEL_LIST_MAIN; switch_to_view (self, previous_view);