Merge pull request 'fix: One more missing context.' (#181) from fix-one-more-context into master
All checks were successful
Check master code / build (push) Successful in 13m26s

Reviewed-on: #181
This commit is contained in:
Amine Bouabdallaoui 2025-02-09 20:44:29 +00:00
commit 3a829df70e

View File

@ -83,7 +83,15 @@ class FilterSheetFragment :
val sourceGroup = binding.sourcesGroup
repository.getSourcesDetailsOrStats().forEachIndexed { _, source ->
val c = Chip(context)
val c: Chip? =
maybeIfContext {
Chip(it)
} as Chip?
if (c == null) {
return
}
c.ellipsize = TextUtils.TruncateAt.END
maybeIfContext {
@ -145,7 +153,11 @@ class FilterSheetFragment :
val tags = repository.getTags()
tags.forEachIndexed { _, tag ->
val c = Chip(context)
val c: Chip? = maybeIfContext { Chip(it) } as Chip?
if (c == null) {
return
}
c.ellipsize = TextUtils.TruncateAt.END
c.text = tag.tag