Only Show referenced note sheets

This commit is contained in:
sebastian 2024-11-01 09:21:55 +01:00
parent 8cb290ab19
commit f632a08256
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

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