aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-10-13 16:06:22 -0700
committerScott Jackson <daneren2005@gmail.com>2016-10-13 16:06:22 -0700
commit3789eba4794eed03d1bf703ed648f08b9e55b90a (patch)
tree9d09d9acffbb6f9e7ce83b2d47e3c90fae03ca45 /app/src/main/java/github
parent406b996e0cbb2a708606ddee4a0a12d90136dcf0 (diff)
downloaddsub-3789eba4794eed03d1bf703ed648f08b9e55b90a.tar.gz
dsub-3789eba4794eed03d1bf703ed648f08b9e55b90a.tar.bz2
dsub-3789eba4794eed03d1bf703ed648f08b9e55b90a.zip
Fixes #749: Fix background cache refresh screwing up Show All
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 0ac968b7..a10c0ed5 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -459,8 +459,12 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section
}
List<Entry> songs = new ArrayList<Entry>();
getSongsRecursively(root, songs);
- root.replaceChildren(songs);
- return root;
+
+ // CachedMusicService is refreshing this data in the background, so will wipe out the songs list from root
+ MusicDirectory clonedRoot = new MusicDirectory(songs);
+ clonedRoot.setId(root.getId());
+ clonedRoot.setName(root.getName());
+ return clonedRoot;
}
private void getSongsRecursively(MusicDirectory parent, List<Entry> songs) throws Exception {
@@ -916,7 +920,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section
for(Integer index: indexes) {
entryGridAdapter.removeAt(index);
}
- Util.toast(context, context.getResources().getString(R.string.removed_playlist, indexes.size(), name));
+ Util.toast(context, context.getResources().getString(R.string.removed_playlist, String.valueOf(indexes.size()), name));
}
@Override