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



commit 238a09b4955b28718daff8d1456b22851d167346
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 99ea61f2..80b2b8dc 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -176,6 +176,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
@@ -199,6 +200,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]