fix(core/ui): fallback typeface

This commit is contained in:
rhunk
2024-10-07 16:31:42 +02:00
parent fe8b5ab289
commit 8b11ce2783
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ class UserInterface(
val actionSheetBackground get() = if (context.androidContext.isDarkTheme()) 0xff1e1e1e.toInt() else 0xffffffff.toInt()
val avenirNextTypeface: Typeface by lazy {
fontMap[600]?.let { context.resources.getFont(it) } ?: throw IllegalStateException("Avenir Next not loaded")
fontMap[600]?.let { context.resources.getFont(it) } ?: Typeface.MONOSPACE
}
fun dpToPx(dp: Int): Int {

View File

@@ -101,7 +101,7 @@ class ChatActionMenu : AbstractMenu() {
this@ChatActionMenu.context.userInterface.apply {
background = createRoundedBackground(actionSheetBackground, 16F, true)
setTextColor(colorPrimary)
typeface = resources.getFont(getFontResource(600) ?: throw IllegalStateException("Avenir Next not loaded"))
typeface = this@ChatActionMenu.context.userInterface.avenirNextTypeface
}
isAllCaps = false
setShadowLayer(0F, 0F, 0F, 0)