From c21e277485178d69c3cf7001900389d76bf219c0 Mon Sep 17 00:00:00 2001 From: Matthieu <24-artectrex@users.noreply.shinice.net> Date: Mon, 31 Oct 2022 00:53:34 +0100 Subject: [PATCH] Fix hashtags and @ in profile description --- .../main/java/org/pixeldroid/app/profile/ProfileActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt b/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt index cedc21fb..fe0f3308 100644 --- a/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt +++ b/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt @@ -2,6 +2,7 @@ package org.pixeldroid.app.profile import android.content.Intent import android.os.Bundle +import android.text.method.LinkMovementMethod import android.util.Log import android.view.LayoutInflater import android.view.View @@ -195,9 +196,11 @@ class ProfileActivity : BaseThemedWithBarActivity() { binding.descriptionTextView.text = parseHTMLText( account.note ?: "", emptyList(), apiHolder, - applicationContext, + binding.descriptionTextView.context, lifecycleScope ) + // This is so that the clicks in the text (eg #, @) work. + binding.descriptionTextView.movementMethod = LinkMovementMethod.getInstance(); val displayName = account.getDisplayName()