navigation behaviour update:
when navigating from a selected item and choosing it again without choosing a different item in between start from where left instead of beginning
This commit is contained in:
parent
61b8734b62
commit
a29e8d7a64
2 changed files with 7 additions and 2 deletions
|
|
@ -28,8 +28,10 @@ MusicController::~MusicController()
|
|||
|
||||
void MusicController::initPlayer(NavigationItemModel *item)
|
||||
{
|
||||
mPlayer->stop();
|
||||
mModel->init(item);
|
||||
if(item != mModel->getCurrentItem()){
|
||||
mPlayer->stop();
|
||||
mModel->init(item);
|
||||
}
|
||||
if(!mIsMediaListSet){
|
||||
mPlayer->setMediaList(mModel->getMedia());
|
||||
mIsMediaListSet = true;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ MusicModel::~MusicModel()
|
|||
|
||||
void MusicModel::init(NavigationItemModel *item)
|
||||
{
|
||||
if(mCurrentItem == item){
|
||||
return;
|
||||
}
|
||||
mCurrentItem = item;
|
||||
emit currentItemChanged();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue