ChatMessagesAdapter: fix non-clickable URLs

main
Alibek Omarov 4 years ago
parent 992f2ec02c
commit 4fa1fb6522
  1. 7
      app/src/main/java/com/keylesspalace/tusky/adapter/ChatMessagesAdapter.kt

@ -17,6 +17,7 @@ import com.keylesspalace.tusky.util.StatusDisplayOptions
import com.keylesspalace.tusky.util.ThemeUtils
import com.keylesspalace.tusky.util.TimestampUtils
import com.keylesspalace.tusky.util.emojify
import com.keylesspalace.tusky.util.LinkHelper
import com.keylesspalace.tusky.view.MediaPreviewImageView
import com.keylesspalace.tusky.viewdata.ChatMessageViewData
import java.text.SimpleDateFormat
@ -40,8 +41,10 @@ class ChatMessagesViewHolder(view: View) : RecyclerView.ViewHolder(view) {
fun setupWithChatMessage(msg: ChatMessageViewData.Concrete, chatActionListener: ChatActionListener, statusDisplayOptions: StatusDisplayOptions, payload: Any?) {
if(payload == null) {
if(msg.content != null)
content.text = msg.content.emojify(msg.emojis, content)
if(msg.content != null) {
val text = msg.content.emojify(msg.emojis, content)
LinkHelper.setClickableText(content, text, null, chatActionListener)
}
setAttachment(msg.attachment, chatActionListener)
setCreatedAt(msg.createdAt)

Loading…
Cancel
Save