forked from upstream-mirrors/quik
added onclick listener to audiobinder. removed recycledviewpool from parts adapter because it was recycling too fast and messing with attachment/part selection
This commit is contained in:
@@ -136,7 +136,6 @@ class MessagesAdapter @Inject constructor(
|
||||
|
||||
private val contactCache = ContactCache()
|
||||
private val expanded = HashMap<Long, Boolean>()
|
||||
private val partsViewPool = RecyclerView.RecycledViewPool()
|
||||
private val subs = subscriptionManager.activeSubscriptionInfoList
|
||||
|
||||
var theme: Colors.Theme = colors.theme()
|
||||
@@ -167,7 +166,6 @@ class MessagesAdapter @Inject constructor(
|
||||
val partsAdapter = partsAdapterProvider.get()
|
||||
partsAdapter.clicks.subscribe(partClicks)
|
||||
view.attachments.adapter = partsAdapter
|
||||
view.attachments.setRecycledViewPool(partsViewPool)
|
||||
view.body.forwardTouches(view)
|
||||
|
||||
return QkViewHolder(view).apply {
|
||||
|
||||
@@ -169,6 +169,8 @@ class AudioBinder @Inject constructor(colors: Colors, private val context: Conte
|
||||
}
|
||||
}
|
||||
|
||||
holder.containerView.setOnClickListener { clicks.onNext(part.id) }
|
||||
|
||||
// if this item is the active active audio item update the active view holder
|
||||
if (audioState.partId == part.id)
|
||||
audioState.viewHolder = holder
|
||||
|
||||
Reference in New Issue
Block a user