aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-02-22 07:39:37 -0800
committerScott Jackson <daneren2005@gmail.com>2013-02-22 07:39:37 -0800
commitce6e1589188e6d008d1784a9165fddd1a44e1e7a (patch)
tree791e9ac940782d5499494bf3317b69dfafb2bb93 /subsonic-android/src/github
parent543bfb2a1aee38b0ccb5dabbf3416e69cb0566d1 (diff)
downloaddsub-ce6e1589188e6d008d1784a9165fddd1a44e1e7a.tar.gz
dsub-ce6e1589188e6d008d1784a9165fddd1a44e1e7a.tar.bz2
dsub-ce6e1589188e6d008d1784a9165fddd1a44e1e7a.zip
Don't go back to the top when removing a playlist
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java6
1 files changed, 4 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 d7deb610..5870f286 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java
@@ -43,6 +43,7 @@ import java.util.List;
public class SelectPlaylistActivity extends SubsonicTabActivity implements AdapterView.OnItemClickListener {
private ListView list;
private View emptyTextView;
+ private PlaylistAdapter playlistAdapter;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -116,7 +117,7 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt
@Override
protected void done(List<Playlist> result) {
- list.setAdapter(new PlaylistAdapter(SelectPlaylistActivity.this, result));
+ list.setAdapter(playlistAdapter = new PlaylistAdapter(SelectPlaylistActivity.this, result));
emptyTextView.setVisibility(result.isEmpty() ? View.VISIBLE : View.GONE);
}
};
@@ -206,7 +207,8 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt
@Override
protected void done(Void result) {
- refresh();
+ playlistAdapter.remove(playlist);
+ playlistAdapter.notifyDataSetChanged();
Util.toast(SelectPlaylistActivity.this, getResources().getString(R.string.menu_deleted_playlist, playlist.getName()));
}