mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 03:22:03 +00:00
fix to enable links in markdown
fix to enable links in markdown when no top level domain was included in the link description This will disable automatic link parsing for hyperlinks, numbers, email address,... Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
3e4995de36
commit
cabe16202b
@ -11,8 +11,8 @@ import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.text.SpannableString
|
||||
import android.text.Spanned
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat.startActivity
|
||||
import com.nextcloud.talk.R
|
||||
import com.nextcloud.talk.models.json.chat.ChatMessage
|
||||
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
||||
@ -155,8 +155,12 @@ class MessageUtils(val context: Context) {
|
||||
}
|
||||
|
||||
override fun configureConfiguration(builder: MarkwonConfiguration.Builder) {
|
||||
builder.linkResolver { view: View?, link: String? ->
|
||||
Log.i(TAG, "Link action not implemented $view / $link")
|
||||
builder.linkResolver { _: View?, link: String? ->
|
||||
val urlIntent = Intent(
|
||||
Intent.ACTION_VIEW,
|
||||
Uri.parse(link)
|
||||
)
|
||||
startActivity(context, urlIntent, null)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -154,7 +154,6 @@
|
||||
app:outcomingTextLinkColor="@color/high_emphasis_text"
|
||||
app:outcomingTextSize="@dimen/chat_text_size"
|
||||
app:outcomingTimeTextSize="12sp"
|
||||
app:textAutoLink="all"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.nextcloud.ui.popupbubble.PopupBubble
|
||||
|
Loading…
Reference in New Issue
Block a user