panel-list: Fix back button after search
This is a fallout from commit b02bc2a935
. It was missing
the check for search.
This commit is contained in:
parent
7bcab0f527
commit
24a5bad48d
1 changed files with 4 additions and 1 deletions
|
@ -966,13 +966,16 @@ cc_panel_list_go_previous (CcPanelList *self)
|
||||||
* Main → Details or Devices → Widget
|
* Main → Details or Devices → Widget
|
||||||
*
|
*
|
||||||
* to
|
* to
|
||||||
|
*
|
||||||
* Main → Details or Devices
|
* Main → Details or Devices
|
||||||
*
|
*
|
||||||
|
* A similar situation may happen with search.
|
||||||
|
*
|
||||||
* To avoid a loop (Details or Devices → Widget → Details or Devices → ...),
|
* 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
|
* make sure to go back to the main view when the current view is details or
|
||||||
* devices.
|
* 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;
|
previous_view = CC_PANEL_LIST_MAIN;
|
||||||
|
|
||||||
switch_to_view (self, previous_view);
|
switch_to_view (self, previous_view);
|
||||||
|
|
Loading…
Add table
Reference in a new issue