aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()));
}