Skip to content

Commit

Permalink
fix: ellipsizeがうまく動作しない問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
pantasystem committed Nov 9, 2023
1 parent faa42bd commit 4a5e672
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.pantasystem.milktea.common_android_ui.user

import android.text.SpannableString
import android.view.View
import android.widget.TextView
import androidx.databinding.BindingAdapter
Expand Down Expand Up @@ -69,8 +68,8 @@ object UserTextHelper {
}
userName?.let {
userName.setText(
SpannableString.valueOf(user.displayUserName),
TextView.BufferType.SPANNABLE,
user.displayUserName,
TextView.BufferType.NORMAL
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,6 @@ class HasReplyToNoteViewHolder(

private val spannableFactory = object : Spannable.Factory() {
override fun newSpannable(source: CharSequence?): Spannable {
return (source as? Spannable?) ?: SpannableString.valueOf(source)
return (source as? Spannable?) ?: SpannableString(source)
}
}

0 comments on commit 4a5e672

Please sign in to comment.