diff --git a/app/src/main/java/org/secuso/privacyfriendlynotes/ui/main/MainActivityViewModel.kt b/app/src/main/java/org/secuso/privacyfriendlynotes/ui/main/MainActivityViewModel.kt index c8bfcd4..fa2e54d 100644 --- a/app/src/main/java/org/secuso/privacyfriendlynotes/ui/main/MainActivityViewModel.kt +++ b/app/src/main/java/org/secuso/privacyfriendlynotes/ui/main/MainActivityViewModel.kt @@ -161,16 +161,16 @@ class MainActivityViewModel(application: Application) : AndroidViewModel(applica private fun Flow>.filterNotes(): Flow> { return this.map { it.filter { note -> - if (note.name.contains(filter.value)) { + if (note.name.contains(filter.value, ignoreCase = true)) { return@filter true } when (note.type) { DbContract.NoteEntry.TYPE_TEXT -> { - return@filter Html.fromHtml(note.content).toString().contains(filter.value) + return@filter Html.fromHtml(note.content).toString().contains(filter.value, ignoreCase = true) } DbContract.NoteEntry.TYPE_CHECKLIST -> { - return@filter ChecklistUtil.parse(note.content).joinToString(System.lineSeparator()).contains(filter.value) + return@filter ChecklistUtil.parse(note.content).joinToString(System.lineSeparator()).contains(filter.value, ignoreCase = true) } else -> return@filter false