fix(core/ui): fallback typeface
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user