Skip to content

Commit

Permalink
adding back the beforeSetText logic for markwon integraton and adding…
Browse files Browse the repository at this point in the history
… a nullable check to avoid attempt to cast a null to non null
  • Loading branch information
ouchadam committed Jan 6, 2022
1 parent 6380ee9 commit 22bab47
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package im.vector.app.features.home.room.detail.timeline.item

import android.text.Spanned
import android.text.method.MovementMethod
import androidx.appcompat.widget.AppCompatTextView
import androidx.core.text.PrecomputedTextCompat
Expand Down Expand Up @@ -91,6 +92,9 @@ abstract class MessageTextItem : AbsMessageItem<MessageTextItem.Holder>() {
it.bind(holder.messageView)
}
}
message?.charSequence.let { charSequence ->
markwonPlugins?.forEach { plugin -> plugin.beforeSetText(holder.messageView, charSequence as Spanned) }
}
super.bind(holder)
holder.messageView.movementMethod = movementMethod
renderSendState(holder.messageView, holder.messageView)
Expand Down

0 comments on commit 22bab47

Please sign in to comment.