set custom typeface also in clipboard suggestion view

and rename read method to get
This commit is contained in:
Helium314 2025-01-18 12:45:26 +01:00
parent c1bbf51fa1
commit 789b533358
6 changed files with 6 additions and 8 deletions

View file

@ -198,6 +198,7 @@ class ClipboardHistoryManager(
// create the view
val binding = ClipboardSuggestionBinding.inflate(LayoutInflater.from(latinIME), parent, false)
val textView = binding.clipboardSuggestionText
latinIME.mSettings.getCustomTypeface()?.let { textView.typeface = it }
textView.text = (if (isClipSensitive(inputType)) "*".repeat(content.length) else content)
.take(200) // truncate displayed text for performance reasons
val clipIcon = latinIME.mKeyboardSwitcher.keyboard.mIconsSet.getIconDrawable(ToolbarKey.PASTE.name.lowercase())