fix(ui): strip internal 'mc' token from the reveal-screen category chip too
The daily reveal chip used displayCategoryName() (a different surface than the Home pill fixed earlier), so it still showed 'Daily Fun Mc'. Fixed centrally in the shared helper. Verified live: reveal now shows 'Daily Fun'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f2321d3536
commit
ca67187754
|
|
@ -337,6 +337,8 @@ private fun answerSummary(question: Question, state: LocalQuestionUiState): Stri
|
|||
fun String.displayCategoryName(): String {
|
||||
return split("_", "-")
|
||||
.filter { it.isNotBlank() }
|
||||
// Internal format tokens (e.g. the "mc" in daily_fun_mc) must never face users.
|
||||
.filterNot { it.lowercase() == "mc" }
|
||||
.joinToString(" ") { part -> part.replaceFirstChar { it.uppercaseChar() } }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue