aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-13 08:35:19 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-13 08:35:19 -0700
commit4275dd7d47ddf5a023615441389a4c3eeca42f5b (patch)
tree9978b0b6c02b5fbb32ed271e34e36d6fd96c61db
parentff868797b593af560ed54b404b83a424ebe4227c (diff)
downloaddsub-4275dd7d47ddf5a023615441389a4c3eeca42f5b.tar.gz
dsub-4275dd7d47ddf5a023615441389a4c3eeca42f5b.tar.bz2
dsub-4275dd7d47ddf5a023615441389a4c3eeca42f5b.zip
Fix random freeze while swapping songs
-rw-r--r--src/github/daneren2005/dsub/fragments/NowPlayingFragment.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index 198e1779..4a720ead 100644
--- a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -521,9 +521,16 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
});
playlistView.setDropListener(new DragSortListView.DropListener() {
@Override
- public void drop(int from, int to) {
- getDownloadService().swap(true, from, to);
- onDownloadListChanged();
+ public void drop(final int from, final int to) {
+ new SilentBackgroundTask<Void>(context) {
+ @Override
+ protected Void doInBackground() throws Throwable {
+ getDownloadService().swap(true, from, to);
+ onDownloadListChanged();
+
+ return null;
+ }
+ }.execute();
}
});
playlistView.setRemoveListener(new DragSortListView.RemoveListener() {