Show average scores in tracker search results

Closes #8280
This commit is contained in:
arkon
2023-12-03 16:52:07 -05:00
parent 1f259f9298
commit 734cb0be6e
9 changed files with 23 additions and 3 deletions

View File

@@ -193,6 +193,7 @@ fun TrackerSearch(
type = it.publishing_type.toLowerCase(Locale.current).capitalize(Locale.current),
startDate = it.start_date,
status = it.publishing_status.toLowerCase(Locale.current).capitalize(Locale.current),
score = it.score,
description = it.summary.trim(),
selected = it == selected,
onClick = { onSelectedChange(it) },
@@ -218,6 +219,7 @@ private fun SearchResultItem(
type: String,
startDate: String,
status: String,
score: Float,
description: String,
selected: Boolean,
onClick: () -> Unit,
@@ -279,6 +281,12 @@ private fun SearchResultItem(
text = status,
)
}
if (score != -1f) {
SearchResultItemDetails(
title = stringResource(MR.strings.score),
text = score.toString(),
)
}
}
}
if (description.isNotBlank()) {