Merge pull request #6536 from thundernest/filter_folder_list

Ignore extraneous spaces when filtering the folder list
This commit is contained in:
cketti 2022-12-22 15:08:49 +01:00 committed by GitHub
commit 6e68cb0bf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,6 +212,7 @@ class ChooseFolderActivity : K9Activity() {
val locale = Locale.getDefault()
val displayName = item.displayName.lowercase(locale)
return constraint.splitToSequence(" ")
.filter { it.isNotEmpty() }
.map { it.lowercase(locale) }
.any { it in displayName }
}