Commit f8867ffb authored by bizzbyster's avatar bizzbyster

more cleanup

parent 594b4cd7
......@@ -172,10 +172,12 @@ class MessageParser @Inject constructor(val context: Application, private val co
if (!link.startsWith("@") && link !in consumed) {
builder.setSpan(object : ClickableSpan() {
override fun onClick(view: View) {
val tabsbuilder = CustomTabsIntent.Builder()
tabsbuilder.setToolbarColor(ContextCompat.getColor(view.context, R.color.colorPrimary))
val customTabsIntent = tabsbuilder.build()
customTabsIntent.launchUrl(view.context, getUri(link))
with (view) {
val tabsbuilder = CustomTabsIntent.Builder()
tabsbuilder.setToolbarColor(ResourcesCompat.getColor(context.resources, R.color.colorPrimary, context.theme))
val customTabsIntent = tabsbuilder.build()
customTabsIntent.launchUrl(context, getUri(link))
}
}
}, matcher.start(0), matcher.end(0))
consumed.add(link)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment