aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index 195d6001..f7ee55d3 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -36,6 +36,7 @@ import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
+import android.os.Parcelable;
import android.util.Log;
import android.view.ContextMenu;
import android.view.Display;
@@ -816,9 +817,16 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
else
emptyTextView.setText(R.string.download_empty);
+ // Save old position
+ Parcelable state = playlistView.onSaveInstanceState();
+ // Set new items
playlistView.setAdapter(new SongListAdapter(list));
+
emptyTextView.setVisibility(list.isEmpty() ? View.VISIBLE : View.GONE);
currentRevision = downloadService.getDownloadListUpdateRevision();
+
+ // Restore old position
+ playlistView.onRestoreInstanceState(state);
switch (downloadService.getRepeatMode()) {
case OFF: