diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-08-09 18:14:43 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-08-09 18:14:43 -0700 |
commit | ceba9812c87544529221dab8d1b97353f1122526 (patch) | |
tree | 6dc8dc8fc156fdaa06888945405434aa0507d5b0 | |
parent | 6e56ad27c106e3fd79dbb93887dfc61ae37be762 (diff) | |
download | dsub-ceba9812c87544529221dab8d1b97353f1122526.tar.gz dsub-ceba9812c87544529221dab8d1b97353f1122526.tar.bz2 dsub-ceba9812c87544529221dab8d1b97353f1122526.zip |
Fix an issue where the wrong index was removed from playlist
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index c26d7085..5ab22ae1 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -274,6 +274,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter addToPlaylist(getSelectedSongs());
return true;
case R.id.menu_remove_playlist:
+ // TODO: getSelected is returning offset
removeFromPlaylist(playlistId, playlistName, getSelectedIndexes());
return true;
case R.id.menu_download_all:
@@ -826,9 +827,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter List<Integer> indexes = new ArrayList<Integer>();
int count = entryList.getCount();
+ int headers = entryList.getHeaderViewsCount();
for (int i = 0; i < count; i++) {
if (entryList.isItemChecked(i)) {
- indexes.add(i - 1);
+ indexes.add(i - headers);
}
}
|