~vthompson/music-app/remix-empty-states-001

« back to all changes in this revision

Viewing changes to music-app.qml

  • Committer: Victor Thompson
  • Date: 2014-10-20 22:02:55 UTC
  • mfrom: (677.1.2 remix)
  • Revision ID: victor.thompson@gmail.com-20141020220255-hiaalbts18zeczfy
merge of remix and fix issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
 
212
212
            // Add album to recent list
213
213
            Library.addRecent(songsAlbumArtistModel.album, songsAlbumArtistModel.artist, songsAlbumArtistModel.art, songsAlbumArtistModel.album, "album")
214
 
            mainView.hasRecent = true
215
214
            recentModel.filterRecent()
216
215
        }
217
216
 
576
575
        // TODO: Switch tabs back and forth to get the background color in the
577
576
        //       header to work properly.
578
577
        tabs.selectedTabIndex = 1
579
 
        tabs.selectedTabIndex = 0
 
578
 
 
579
        // goto Recent if there are items otherwise go to Albums
 
580
        tabs.selectedTabIndex = Library.isRecentEmpty() ? 2 : 0
580
581
 
581
582
        // Run post load
582
583
        tabs.ensurePopulated(tabs.selectedTab);
589
590
    // VARIABLES
590
591
    property string musicName: i18n.tr("Music")
591
592
    property string appVersion: '1.2'
592
 
    property bool hasRecent: !Library.isRecentEmpty()
593
593
    property bool scrobble: false
594
594
    property string lastfmusername
595
595
    property string lastfmpassword
1156
1156
        visible: noMusic || noPlaylists || noRecent
1157
1157
 
1158
1158
        property bool noMusic: allSongsModel.rowCount === 0 && allSongsModel.status === SongsModel.Ready && loadedUI
1159
 
        property bool noPlaylists: Playlists.getPlaylists().length === 0
1160
 
        property bool noRecent: !mainView.hasRecent
 
1159
        property bool noPlaylists: playlistModel.model.count === 0
 
1160
        property bool noRecent: recentModel.model.count === 0
1161
1161
 
1162
1162
        tools: ToolbarItems {
1163
1163
            back: null