Merge pull request #5531 from k9mail/fix_folder_list_filter

Ignore extraneous spaces when filtering the folder list
This commit is contained in:
cketti 2021-08-09 14:46:21 +02:00 committed by GitHub
commit 78317f17b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,6 +146,7 @@ class ManageFoldersFragment : Fragment() {
val locale = Locale.getDefault()
val displayName = item.displayName.toLowerCase(locale)
return constraint.splitToSequence(" ")
.filter { it.isNotEmpty() }
.map { it.toLowerCase(locale) }
.any { it in displayName }
}