diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-08-28 22:43:54 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-08-28 22:43:54 -0700 |
commit | 27ca2300b4b69ac7ec563f5a455dc7b69c1b7266 (patch) | |
tree | c60bb00b6c503303ce0640c57f311413174a388a /src | |
parent | 4d88a0cff594c4d615bd77c855ce7d32066cf4cf (diff) | |
download | dsub-27ca2300b4b69ac7ec563f5a455dc7b69c1b7266.tar.gz dsub-27ca2300b4b69ac7ec563f5a455dc7b69c1b7266.tar.bz2 dsub-27ca2300b4b69ac7ec563f5a455dc7b69c1b7266.zip |
Tweak adapter logic to check for instanceof
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 9c76ba3c..3bbc9fac 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -932,10 +932,10 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR // Create new if not getting a convert view to use
PlaylistSongView view;
- if(convertView == null) {
- view = (PlaylistSongView) new PlaylistSongView(context);
- } else {
+ if(convertView instanceof PlaylistSongView) {
view = (PlaylistSongView) convertView;
+ } else {
+ view = new PlaylistSongView(context);
}
view.setObject(playlist, songs);
|