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:
Georges Basile Stavracas Neto 2018-11-19 00:07:12 -02:00
parent 7bcab0f527
commit 24a5bad48d
No known key found for this signature in database
GPG key ID: 886C17EE170D1385

View file

@ -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);