[gnome-music/wip/jfelder/window-cleanups: 2/4] window: Simplify notify_mode method



commit c3e6d1421f7edf14c1d8a43923f38deb1d6a2886
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Nov 15 14:44:30 2018 +0100

    window: Simplify notify_mode method
    
    Switch back to all albums view logic is already handled by the
    _back_button_clicked method.

 gnomemusic/window.py | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index e77d0461..0e7d63e2 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -410,12 +410,6 @@ class Window(Gtk.ApplicationWindow):
         self.prev_view = self.curr_view
         self.curr_view = stack.get_visible_child()
 
-        # Switch to all albums view when we're clicking Albums
-        if (self.curr_view == self.views[View.ALBUM]
-                and not (self.prev_view == self.views[View.SEARCH]
-                    or self.prev_view == self.views[View.EMPTY])):
-            self.curr_view.set_visible_child(self.curr_view._grid)
-
         if (self.curr_view != self.views[View.SEARCH]
                 and self.curr_view != self.views[View.EMPTY]):
             self._searchbar.reveal(False)


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