This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun initHotline(applicationContext: Context) { | |
initHotlineBaseConfig(applicationContext) | |
initHotlineNotification(applicationContext) | |
initHotlineUser(applicationContext) | |
} | |
private fun initHotlineBaseConfig(applicationContext: Context) { | |
val hotlineConfig = HotlineConfig(BuildConfig.HOTLINE_APP_ID, BuildConfig.HOTLINE_APP_KEY) | |
Hotline.getInstance(applicationContext).init(hotlineConfig) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun applyHashtagSpanForResiNumber(fullText: String, | |
messageEditorSpannable: Spannable) { | |
launch(UI) { | |
var indexAsync = async(CommonPool, CoroutineStart.LAZY) { | |
fullText.indexOf(RESI_NUMBER, 0) | |
} | |
while (indexAsync.await() != -1) { | |
val hashtagSpanAsync = async(CommonPool, CoroutineStart.LAZY) { | |
CharacterStyle.wrap(hashtagForegroundColorSpan) | |
} |
OlderNewer