fix song order on album detail activity
This commit is contained in:
parent
67d7391c53
commit
e337c7d6b3
1 changed files with 1 additions and 4 deletions
|
|
@ -170,14 +170,11 @@ public class QueryUtil {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(ItemsResult result) {
|
public void onResponse(ItemsResult result) {
|
||||||
List<Song> songs = new ArrayList<>();
|
List<Song> songs = new ArrayList<>();
|
||||||
List<String> ids = new ArrayList<>();
|
|
||||||
for (BaseItemDto itemDto : result.getItems()) {
|
for (BaseItemDto itemDto : result.getItems()) {
|
||||||
songs.add(new Song(itemDto));
|
songs.add(new Song(itemDto));
|
||||||
ids.add(itemDto.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
App.getDatabase().songDao().insertSongs(songs);
|
callback.onLoadMedia(songs);
|
||||||
callback.onLoadMedia(App.getDatabase().cacheDao().getSongs(ids));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue