[gnome-music/wip/jfelder/smartplaylists-ui-v2: 21/29] grltrackerplaylists: Update user_model filter on deletion



commit c455d391baefba83205f0da18fc86c07e420464d
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Jan 21 23:33:07 2020 +0100

    grltrackerplaylists: Update user_model filter on deletion
    
    user_model filter depends on the list of playlists which are about to
    de deleted. So, it needs to be updated every time this list changes.

 gnomemusic/grilowrappers/grltrackerplaylists.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 5b147aa8..cf537276 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -175,6 +175,7 @@ class GrlTrackerPlaylists(GObject.GObject):
         """
         self._pls_todelete.append(playlist)
         self._model_filter.set_filter_func(self._playlists_filter)
+        self._user_model_filter.set_filter_func(self._user_playlists_filter)
 
     def finish_playlist_deletion(self, playlist, deleted):
         """Removes playlist from the list of playlists to delete
@@ -198,6 +199,8 @@ class GrlTrackerPlaylists(GObject.GObject):
                     break
 
             self._model_filter.set_filter_func(self._playlists_filter)
+            self._user_model_filter.set_filter_func(
+                self._user_playlists_filter)
             self._window.notifications_popup.pop_loading()
 
         self._window.notifications_popup.push_loading()


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