diff --git a/app/src/main/java/core/notevault/data/MusicNoteDAO.java b/app/src/main/java/core/notevault/data/MusicNoteDAO.java index 63c9a0a..21a9f9e 100644 --- a/app/src/main/java/core/notevault/data/MusicNoteDAO.java +++ b/app/src/main/java/core/notevault/data/MusicNoteDAO.java @@ -18,6 +18,6 @@ public interface MusicNoteDAO { @Query("SELECT * FROM music_notes") List getAllNotes(); - @Query("SELECT * FROM note_sheets") - List getNoteSheetsForMusicSong(); + @Query("SELECT * FROM note_sheets WHERE musicNoteId = :musicNoteId") + List getNoteSheetsForMusicSong(long musicNoteId); } diff --git a/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java b/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java index 51b839c..964cae2 100644 --- a/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java +++ b/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java @@ -110,7 +110,7 @@ public class NoteSongAdapter extends RecyclerView.Adapter doInBackground(Void... voids) { - List sheets = musicNoteDAO.getNoteSheetsForMusicSong(); + List sheets = musicNoteDAO.getNoteSheetsForMusicSong(this.musicNoteId); Log.d("LoadNoteSheetsTask", "Loaded NoteSheets: " + sheets.get(0)); return sheets; }