diff --git a/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt b/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt index 9ac61bb0a..fbabf9a94 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt @@ -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) } } }) diff --git a/app/src/main/res/layout/activity_chat.xml b/app/src/main/res/layout/activity_chat.xml index 554ffbddb..ec0fb35dc 100644 --- a/app/src/main/res/layout/activity_chat.xml +++ b/app/src/main/res/layout/activity_chat.xml @@ -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" />