Commit 26186f8c authored by Eugene Shapovalov's avatar Eugene Shapovalov 💬

Remove redundant release loading markdown drawables in recycler.

parent e4a101a2
......@@ -36,18 +36,6 @@ class TargetHeaderAdapterDelegate(
payloads: MutableList<Any>
) = (viewHolder as ViewHolder).bind(items[position] as TargetHeader)
override fun onViewDetachedFromWindow(holder: RecyclerView.ViewHolder) {
super.onViewDetachedFromWindow(holder)
(holder as ViewHolder).release()
}
override fun onViewRecycled(viewHolder: RecyclerView.ViewHolder) {
super.onViewRecycled(viewHolder)
(viewHolder as ViewHolder).release()
}
private inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
private lateinit var item: TargetHeader
......@@ -142,9 +130,5 @@ class TargetHeaderAdapterDelegate(
}
}
}
fun release() {
Markwon.unscheduleDrawables(itemView.descriptionTextView)
}
}
}
\ No newline at end of file
......@@ -31,18 +31,6 @@ class UserNoteAdapterDelegate(private val clickListener: (Note) -> Unit) : Adapt
payloads: MutableList<Any>
) = (viewHolder as ViewHolder).bind(items[position] as NoteWithFormattedBody)
override fun onViewDetachedFromWindow(holder: RecyclerView.ViewHolder) {
super.onViewDetachedFromWindow(holder)
(holder as ViewHolder).release()
}
override fun onViewRecycled(viewHolder: RecyclerView.ViewHolder) {
super.onViewRecycled(viewHolder)
(viewHolder as ViewHolder).release()
}
private inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
private lateinit var note: Note
......@@ -59,9 +47,5 @@ class UserNoteAdapterDelegate(private val clickListener: (Note) -> Unit) : Adapt
Markwon.setText(descriptionTextView, data.body)
}
}
fun release() {
Markwon.unscheduleDrawables(itemView.descriptionTextView)
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment