diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabAdapter.kt index a889dfef..6064f10a 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabAdapter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabAdapter.kt @@ -77,7 +77,7 @@ class MessageTabAdapter @Inject constructor() : } messageItemAttachmentIcon.visibility = if (item.hasAttachments) View.VISIBLE else View.GONE - root.setOnClickListener { onClickListener(item, position) } + root.setOnClickListener { onClickListener(item, holder.adapterPosition) } } } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabPresenter.kt index f96fb6c2..6513adcd 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/message/tab/MessageTabPresenter.kt @@ -64,7 +64,7 @@ class MessageTabPresenter @Inject constructor( } fun onMessageItemSelected(message: Message, position: Int) { - Timber.i("Select message ${message.id} item") + Timber.i("Select message ${message.id} item (position: $position)") view?.run { openMessage(message) if (message.unread) { @@ -132,6 +132,8 @@ class MessageTabPresenter @Inject constructor( } } + Timber.d("Applying filter. Full list: ${messages.size}, filtered: ${filteredList.size}") + updateData(filteredList) }