After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744831 - Deleting playlists in quick succession only affects last playlist
Deleting playlists in quick succession only affects last playlist
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-19 23:35 UTC by Maia
Modified: 2016-03-14 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch to show one playlist deleted notification at a time (2.60 KB, patch)
2016-02-15 03:46 UTC, Prashant Tyagi
none Details | Review
A updated patch. (2.08 KB, patch)
2016-02-15 07:14 UTC, Prashant Tyagi
none Details | Review
A updated patch. (4.21 KB, patch)
2016-03-14 20:08 UTC, Prashant Tyagi
committed Details | Review

Description Maia 2015-02-19 23:35:33 UTC
When deleting multiple playlists in quick succession, unless you dismiss the "Playlist Deleted" notification between each (either confirming or undoing the deletion), the notifications all stack on top of each other visually, but only the last-deleted playlist can be either deleted or un-deleted.
Comment 1 Maia 2015-02-24 17:27:21 UTC
The fix for this will probably look like dismissing the existing notification (and therefore deleting that playlist) if another notification is created--and in fact, this is something we should have in place for all notifications, because stacked notifications are ugly and unnecessary.
Comment 2 Allan Day 2016-01-05 18:04:49 UTC
I see this too - the in-app notifications for removing a playlist stack up on top of one another.

This isn't how in-app notifications should work: only one should be shown at once. If the user removes a playlist while an undo notification is being shown, the first notification should be immediately dismissed and replaced with the new one.
Comment 3 Prashant Tyagi 2016-02-15 03:46:09 UTC
Created attachment 321184 [details] [review]
A patch to show one playlist deleted notification at a time

A patch to fix this issue.
Comment 4 Prashant Tyagi 2016-02-15 07:14:35 UTC
Created attachment 321198 [details] [review]
A updated patch.

there was some unnecessary line in the above patch so i removed that one.
Comment 5 Prashant Tyagi 2016-03-14 20:08:49 UTC
Created attachment 323916 [details] [review]
A updated patch.

Initial issues that felipe was complaing about that when two playlist that
are deleted one after other, deletes first one this is because signal
'item-activate' has been emited before playlist even remove from the
playlist model,
so i remove playlist from the playlist model before emit the signal.
 there should only be one notification at a time so we have to track
that whether notification has been attach to the overlay or not, if it is
then destroy old one and delete the playlist associate with  that. so
i introduce the variable self.pl_todelete_notification.

This patch will also solve the bug that was filled by me. Felipe if this is commited then please close the bug
https://bugzilla.gnome.org/show_bug.cgi?id=761988
Comment 6 Felipe Borges 2016-03-14 20:13:12 UTC
Review of attachment 323916 [details] [review]:

Thanks for your patch.

It solves both issues for now. I hope we get to refactor the Playlist management code in the future to avoid such problems.
Comment 7 Felipe Borges 2016-03-14 20:16:37 UTC
Pushed to master as 76a6e8f109807ea204cddf623a1eaf523187aa12.