diff --git a/app/src/main/java/core/notevault/MainActivity.java b/app/src/main/java/core/notevault/MainActivity.java index 699b911..4b5bd55 100644 --- a/app/src/main/java/core/notevault/MainActivity.java +++ b/app/src/main/java/core/notevault/MainActivity.java @@ -81,7 +81,10 @@ public class MainActivity extends AppCompatActivity implements MetaDataDialog.On new Thread(() -> { MusicNote musicNote = new MusicNote(title, composer, year, genre); long musicNoteID = musicDB.musicNoteDao().insert(musicNote); + musicNote.setMusicNoteId(musicNoteID); + Log.d("MainActivity", "MusicNoteID of inserted song: " + musicNoteID); + Log.d("MainActivity", "MusicNoteID of referenced song: " + musicNote.getMusicNoteId()); for(Uri uri: uris) { String filePath = saveImageInternally(uri); NoteSheet noteSheet = new NoteSheet(musicNoteID, filePath); 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 a7fb6b3..6289b3e 100644 --- a/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java +++ b/app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java @@ -111,6 +111,7 @@ public class NoteSongAdapter extends RecyclerView.Adapter doInBackground(Void... voids) { List sheets = musicNoteDAO.getNoteSheetsForMusicSong(this.musicNoteId); + Log.d("LoadedNoteSheetsTask", "ID: " + this.musicNoteId); Log.d("LoadNoteSheetsTask", "Loaded NoteSheets: " + sheets.size()); return sheets; }