void PlayersModel::SetCurrentIndex(int16_t value)
{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersModel::SetCurrentIndex,value = %d",value);
currentIndex = value;
/* -------------------------------------------------------------------------- */
m_PlayersCaseListAdapter = PlayersCaseListAdapter::GetInstance();
- m_PlayersCaseListAdapter->p_BtnOnClickListListener->SongClick(m_PlayersCaseListAdapter,currentIndex);
- for(int i= 0;i<m_PlayersCaseListAdapter->GetCount();i++)
+ if(m_PlayersCaseListAdapter!=nullptr)
{
- if(i != currentIndex)
+ m_PlayersCaseListAdapter->p_BtnOnClickListListener->SongClick(m_PlayersCaseListAdapter,currentIndex);
+ for(int i= 0;i<m_PlayersCaseListAdapter->GetCount();i++)
{
- m_PlayersCaseListAdapter->p_BtnOnClickListListener->SongNotClick(m_PlayersCaseListAdapter,i);
+ if(i != currentIndex)
+ {
+ m_PlayersCaseListAdapter->p_BtnOnClickListListener->SongNotClick(m_PlayersCaseListAdapter,i);
+ }
}
}
PlayersView::GetInstance()->GetPlayerList();