fix song order on album detail activity

This commit is contained in:
dkanada 2021-05-12 01:34:40 +09:00
commit e337c7d6b3

View file

@ -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