diff options
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java | 7 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/PlaylistAdapter.java | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java index 2eea0e74..5feaa482 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java @@ -125,7 +125,12 @@ public class ArtistAdapter extends SectionAdapter<Artist> implements FastScrolle @Override public String getTextToShowInBubble(int position) { - return getNameIndex(getItemForPosition(position).getName(), true); + Object item = getItemForPosition(position); + if(item instanceof Artist) { + return getNameIndex(((Artist) item).getName(), true); + } else { + return null; + } } public interface OnMusicFolderChanged { diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/PlaylistAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/PlaylistAdapter.java index 7f7aacff..6402eecb 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/PlaylistAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/PlaylistAdapter.java @@ -62,6 +62,11 @@ public class PlaylistAdapter extends SectionAdapter<Playlist> implements FastScr @Override public String getTextToShowInBubble(int position) { - return getNameIndex(getItemForPosition(position).getName()); + Object item = getItemForPosition(position); + if(item instanceof Playlist) { + return getNameIndex(((Playlist) item).getName()); + } else { + return null; + } } } |