diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/data/local/dao/NoteRoomDaoTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/data/local/dao/NoteRoomDaoTest.kt index 60b4cb1ed..ad795e091 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/data/local/dao/NoteRoomDaoTest.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/data/local/dao/NoteRoomDaoTest.kt @@ -86,7 +86,6 @@ class NoteRoomDaoTest { fun saveNote() = runBlocking { val context = ApplicationProvider.getApplicationContext() val notesItem: NoteListItem = mockk(relaxed = true) - val notesItemList: List = listOf(notesItem) db = Room.inMemoryDatabaseBuilder( context, KiwixRoomDatabase::class.java ).build() diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/dao/NotesRoomDao.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/dao/NotesRoomDao.kt index 10e1d8237..b492af93b 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/dao/NotesRoomDao.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/dao/NotesRoomDao.kt @@ -49,13 +49,13 @@ abstract class NotesRoomDao : PageDao { @Insert(onConflict = OnConflictStrategy.REPLACE) abstract fun saveNote(notesRoomEntity: NotesRoomEntity) - @Query("DELETE FROM NotesRoomEntity WHERE noteTitle=:noteUniqueKey") - abstract fun deleteNote(noteUniqueKey: String) + @Query("DELETE FROM NotesRoomEntity WHERE noteTitle=:noteTitle") + abstract fun deleteNote(noteTitle: String) fun deleteNotes(notesList: List) { notesList.forEachIndexed { _, note -> val notesRoomEntity = NotesRoomEntity(note) - deleteNote(noteUniqueKey = notesRoomEntity.noteTitle) + deleteNote(noteTitle = notesRoomEntity.noteTitle) } }