From c423084cf4f4973e958c98b2c3502625a5986dd3 Mon Sep 17 00:00:00 2001 From: Elouan BOITEUX Date: Mon, 27 Apr 2026 11:11:31 +0200 Subject: [PATCH] fix: Remove display of old thread during loading --- .../infomaniak/mail/ui/main/thread/ThreadAdapter.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadAdapter.kt b/app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadAdapter.kt index ae7976ae8e..346a3e9342 100644 --- a/app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadAdapter.kt +++ b/app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadAdapter.kt @@ -138,6 +138,18 @@ class ThreadAdapter( super.onAttachedToRecyclerView(recyclerView) } + override fun onViewRecycled(holder: ThreadAdapterViewHolder) { + super.onViewRecycled(holder) + if (holder is MessageViewHolder) { + with(holder.binding) { + bodyWebView.stopLoading() + fullMessageWebView.stopLoading() + bodyWebView.isVisible = false + fullMessageWebView.isVisible = false + } + } + } + override fun getItemCount(): Int = items.count() override fun getItemViewType(position: Int): Int = runCatchingRealm {