From 38e4ca2eed7aaff6b32a2cebdffe2f2d75fa50ea Mon Sep 17 00:00:00 2001 From: sebastian Date: Fri, 1 Nov 2024 14:49:17 +0100 Subject: [PATCH] FIXME --- app/src/main/java/core/notevault/MainActivity.java | 3 +++ app/src/main/java/core/notevault/ui/home/NoteSongAdapter.java | 1 + 2 files changed, 4 insertions(+) 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; }