Fix Search lexicon highlight

This commit is contained in:
Thomas Andres Gomez 2023-12-13 09:31:45 +01:00
parent 6fb3b2c10c
commit 9cbd33fd2e
2 changed files with 6 additions and 6 deletions

View file

@ -82,7 +82,7 @@ class SearchUseCase @Inject constructor(
text = item.race, text = item.race,
highlightRegex styleWith typography.search.extractHighlight, highlightRegex styleWith typography.search.extractHighlight,
), ),
status = item.status?.let { extractWordRegex.find(it) }?.let { status = item.status?.let { extractSentenceRegex.find(it) }?.let {
AnnotatedString( AnnotatedString(
text = "$statusPrefix ", text = "$statusPrefix ",
spanStyle = typography.search.extractBold, spanStyle = typography.search.extractBold,
@ -91,7 +91,7 @@ class SearchUseCase @Inject constructor(
highlightRegex styleWith typography.search.extractHighlight, highlightRegex styleWith typography.search.extractHighlight,
) )
}, },
location = item.location?.let { extractWordRegex.find(it) }?.let { location = item.location?.let { extractSentenceRegex.find(it) }?.let {
AnnotatedString( AnnotatedString(
text = "$locationPrefix ", text = "$locationPrefix ",
spanStyle = typography.search.extractBold, spanStyle = typography.search.extractBold,

View file

@ -57,8 +57,8 @@ fun CharacterSheetHeader(
alignment = Alignment.CenterHorizontally alignment = Alignment.CenterHorizontally
), ),
) { ) {
header.value?.resource?.let { header.value?.speed?.let {
ResourcePoint(resource = it, onClick = onResource) LabelPoint(label = it)
} }
header.value?.armorClass?.let { header.value?.armorClass?.let {
LabelPoint(label = it) LabelPoint(label = it)
@ -69,8 +69,8 @@ fun CharacterSheetHeader(
header.value?.dC?.let { header.value?.dC?.let {
LabelPoint(label = it) LabelPoint(label = it)
} }
header.value?.speed?.let { header.value?.resource?.let {
LabelPoint(label = it) ResourcePoint(resource = it, onClick = onResource)
} }
} }