Merge lp:~vthompson/music-app/remix-fix-playlist-delete into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 734
Merged at revision: 734
Proposed branch: lp:~vthompson/music-app/remix-fix-playlist-delete
Merge into: lp:music-app/remix
Diff against target: 33 lines (+5/-3)
1 file modified
common/SongsPage.qml (+5/-3)
To merge this branch: bzr merge lp:~vthompson/music-app/remix-fix-playlist-delete
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Andrew Hayzen Approve
Review via email: mp+241454@code.launchpad.net

Commit message

Fix for playlist deletion in recent DB

Description of the change

Fix for playlist deletion in recent DB. Set to force the filter/change flag if we are calling after the playlist is deleted.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM :)

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'common/SongsPage.qml'
2--- common/SongsPage.qml 2014-11-11 18:54:47 +0000
3+++ common/SongsPage.qml 2014-11-11 20:09:42 +0000
4@@ -61,8 +61,10 @@
5 onTriggered: albumTracksModel.filterPlaylistTracks(line2)
6 }
7
8- function playlistChangedHelper()
9+ function playlistChangedHelper(force)
10 {
11+ force = force === undefined ? false : force // default force to false
12+
13 // if parent Playlists then set changed otherwise refilter
14 if (songStackPage.page.title === i18n.tr("Playlists")) {
15 if (songStackPage.page !== undefined) {
16@@ -72,7 +74,7 @@
17 playlistModel.filterPlaylists()
18 }
19
20- if (Library.recentContainsPlaylist(songStackPage.line2)) {
21+ if (Library.recentContainsPlaylist(songStackPage.line2) || force) {
22 // if parent Recent then set changed otherwise refilter
23 if (songStackPage.page.title === i18n.tr("Recent")) {
24 if (songStackPage.page !== undefined) {
25@@ -567,7 +569,7 @@
26 Library.recentRemovePlaylist(dialogRemovePlaylist.oldPlaylistName)
27 }
28
29- playlistChangedHelper() // update recent/playlist models
30+ playlistChangedHelper(true) // update recent/playlist models
31
32 songStackPage.page = undefined
33 PopupUtils.close(dialogRemovePlaylist)

Subscribers

People subscribed via source and target branches