From d868c532b797185ff8ba59888afd287e828dfb70 Mon Sep 17 00:00:00 2001 From: hmalik144 Date: Mon, 23 Mar 2026 23:41:05 +0000 Subject: [PATCH] mid commit --- .../app/src/main/java/dev/dettmer/simplenotes/di/AppModule.kt | 3 ++- .../main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/dev/dettmer/simplenotes/di/AppModule.kt b/android/app/src/main/java/dev/dettmer/simplenotes/di/AppModule.kt index 1fbb708..3284033 100644 --- a/android/app/src/main/java/dev/dettmer/simplenotes/di/AppModule.kt +++ b/android/app/src/main/java/dev/dettmer/simplenotes/di/AppModule.kt @@ -2,6 +2,7 @@ package dev.dettmer.simplenotes.di import android.content.Context import androidx.room.Room +import dev.dettmer.simplenotes.MainViewModel import dev.dettmer.simplenotes.storage.AppDatabase import dev.dettmer.simplenotes.storage.NotesStorage import dev.dettmer.simplenotes.ui.main.MainViewModel @@ -29,5 +30,5 @@ val appModule = module { single { NotesStorage(androidContext(), get()) } - viewModel { MainViewModel(get(), get()) } + viewModel { MainViewModel(get(), get(), get()) } } diff --git a/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt b/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt index 1e0316b..5cdb7b8 100644 --- a/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt +++ b/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt @@ -211,7 +211,8 @@ class MainViewModel( val pendingIds = _pendingDeletions.value val filteredNotes = allNotes.filter { it.id !in pendingIds }.map { Note( id = it.id, - content = it.content + content = it.content, + ) } withContext(Dispatchers.Main) {