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")
|
||||
List<MusicNote> getAllNotes();
|
||||
|
||||
@Query("SELECT * FROM note_sheets")
|
||||
List<NoteSheet> getNoteSheetsForMusicSong();
|
||||
@Query("SELECT * FROM note_sheets WHERE musicNoteId = :musicNoteId")
|
||||
List<NoteSheet> getNoteSheetsForMusicSong(long musicNoteId);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class NoteSongAdapter extends RecyclerView.Adapter<NoteSongAdapter.NoteVi
|
||||
|
||||
@Override
|
||||
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));
|
||||
return sheets;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user