FIX: Notes are not beeing displayed
This commit is contained in:
parent
b9fe9cf184
commit
dd7e9dce65
@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-05-10T09:35:55.287804256Z">
|
||||
<DropdownSelection timestamp="2025-05-10T10:58:30.749991183Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=/home/sebastian/.android/avd/Pixel_9.avd" />
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=R52N50NLGRT" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
@ -22,6 +22,6 @@ interface NoteDao {
|
||||
|
||||
@Update
|
||||
suspend fun update(note: NoteEntity)
|
||||
@Query("SELECT * FROM notes WHERE collectionId = :collectionId")
|
||||
@Query("SELECT * FROM notes WHERE collectionId IS :collectionId")
|
||||
fun getNotesForCollection(collectionId: Int?): Flow<List<NoteEntity>>
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package come.stormborntales.notevault.ui.viewmodel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import come.stormborntales.notevault.data.local.entity.NoteCollection
|
||||
@ -41,6 +42,7 @@ class NoteBrowserViewModel (
|
||||
}
|
||||
launch {
|
||||
noteRepository.getNotesForCollection(parentId).collect {
|
||||
Log.d("NoteBrowser", "Noten geladen: ${it.size}")
|
||||
_currentNotes.value = it
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user