Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to enable links in markdown #3481

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}
})
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_chat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading