Fix crash when selecting the playlist header
This commit is contained in:
parent
50a8a851d0
commit
066cc97d32
2 changed files with 1 additions and 24 deletions
|
|
@ -93,7 +93,7 @@ public abstract class AbsOffsetSongAdapter extends SongAdapter {
|
|||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (isInQuickSelectMode()) {
|
||||
if (isInQuickSelectMode() && getItemViewType() != OFFSET_ITEM) {
|
||||
toggleChecked(getAdapterPosition());
|
||||
} else {
|
||||
MusicPlayerRemote.openQueue(dataSet, getAdapterPosition() - 1, true);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import android.view.View;
|
|||
|
||||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.helper.MusicPlayerRemote;
|
||||
import com.kabouzeid.gramophone.interfaces.CabHolder;
|
||||
import com.kabouzeid.gramophone.model.Song;
|
||||
import com.kabouzeid.gramophone.util.MusicUtil;
|
||||
|
|
@ -72,28 +71,6 @@ public class PlaylistSongAdapter extends AbsOffsetSongAdapter {
|
|||
return R.menu.menu_item_cannot_delete_single_songs_playlist_song;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Song getSong() {
|
||||
if (getItemViewType() == OFFSET_ITEM) return Song.EMPTY_SONG;
|
||||
return dataSet.get(getAdapterPosition() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (isInQuickSelectMode()) {
|
||||
toggleChecked(getAdapterPosition());
|
||||
} else {
|
||||
MusicPlayerRemote.openQueue(dataSet, getAdapterPosition() - 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
if (getItemViewType() == OFFSET_ITEM) return false;
|
||||
toggleChecked(getAdapterPosition());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onSongMenuItemClick(MenuItem item) {
|
||||
if (item.getItemId() == R.id.action_go_to_album) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue