Only Show referenced note sheets
This commit is contained in:
parent
8cb290ab19
commit
f632a08256
@ -18,6 +18,6 @@ public interface MusicNoteDAO {
|
|||||||
@Query("SELECT * FROM music_notes")
|
@Query("SELECT * FROM music_notes")
|
||||||
List<MusicNote> getAllNotes();
|
List<MusicNote> getAllNotes();
|
||||||
|
|
||||||
@Query("SELECT * FROM note_sheets")
|
@Query("SELECT * FROM note_sheets WHERE musicNoteId = :musicNoteId")
|
||||||
List<NoteSheet> getNoteSheetsForMusicSong();
|
List<NoteSheet> getNoteSheetsForMusicSong(long musicNoteId);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ public class NoteSongAdapter extends RecyclerView.Adapter<NoteSongAdapter.NoteVi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<NoteSheet> doInBackground(Void... voids) {
|
protected List<NoteSheet> doInBackground(Void... voids) {
|
||||||
List<NoteSheet> sheets = musicNoteDAO.getNoteSheetsForMusicSong();
|
List<NoteSheet> sheets = musicNoteDAO.getNoteSheetsForMusicSong(this.musicNoteId);
|
||||||
Log.d("LoadNoteSheetsTask", "Loaded NoteSheets: " + sheets.get(0));
|
Log.d("LoadNoteSheetsTask", "Loaded NoteSheets: " + sheets.get(0));
|
||||||
return sheets;
|
return sheets;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user