aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-12-28 18:30:24 -0800
committerScott Jackson <daneren2005@gmail.com>2012-12-28 18:30:24 -0800
commit59c72c25dc892250cc531441a0e443b7f894d949 (patch)
tree9d7c3e69176c89cf2e0967d06f4829af85d7a5ba
parent30cd08b2f2177cf1cd86d982807b6632c6241f62 (diff)
downloaddsub-59c72c25dc892250cc531441a0e443b7f894d949.tar.gz
dsub-59c72c25dc892250cc531441a0e443b7f894d949.tar.bz2
dsub-59c72c25dc892250cc531441a0e443b7f894d949.zip
Closes #83 Move sort of playlist to parser
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java
index a88cdcaf..70904ff7 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java
@@ -112,7 +112,7 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt
@Override
protected void done(List<Playlist> result) {
- list.setAdapter(new PlaylistAdapter(SelectPlaylistActivity.this, PlaylistAdapter.PlaylistComparator.sort(result)));
+ list.setAdapter(new PlaylistAdapter(SelectPlaylistActivity.this, result));
emptyTextView.setVisibility(result.isEmpty() ? View.VISIBLE : View.GONE);
}
};
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java b/subsonic-android/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java
index c6a18580..7d6a587f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java
@@ -22,6 +22,7 @@ import android.content.Context;
import github.daneren2005.dsub.R;
import github.daneren2005.dsub.domain.Playlist;
import github.daneren2005.dsub.util.ProgressListener;
+import github.daneren2005.dsub.view.PlaylistAdapter;
import org.xmlpull.v1.XmlPullParser;
import java.io.Reader;
@@ -65,7 +66,7 @@ public class PlaylistsParser extends AbstractParser {
validate();
updateProgress(progressListener, R.string.parser_reading_done);
- return result;
+ return PlaylistAdapter.PlaylistComparator.sort(result);
}
} \ No newline at end of file