Skip to content

Commit

Permalink
fix a cache problem in showing duplicate short replies #21
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Dec 3, 2021
1 parent e883404 commit 8388f16
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ThreadAdapter(var threadType: Map<String, String>?, var bbsInfo: Discuz, v
}
} else if (holderRaw is ThreadViewHolder) {
val holder = holderRaw
val sp = Html.fromHtml(thread.subject)
val sp = Html.fromHtml(thread.subject,Html.FROM_HTML_MODE_COMPACT)
val spannableString = SpannableString(sp)
holder.mTitle.setText(spannableString, TextView.BufferType.SPANNABLE)
holder.mThreadViewNum.text = numberFormatUtils.getShortNumberText(thread.views)
Expand Down Expand Up @@ -284,6 +284,8 @@ class ThreadAdapter(var threadType: Map<String, String>?, var bbsInfo: Discuz, v
holder.mReplyRecyclerview.adapter = adapter
holder.mReplyRecyclerview.isNestedScrollingEnabled = false
} else {
// still flush it to avoid cache problem
holder.mReplyRecyclerview.adapter = ShortPostAdapter()
}
holder.mCardview.setOnClickListener {
val intent = Intent(context, ThreadActivity::class.java)
Expand Down

0 comments on commit 8388f16

Please sign in to comment.