From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Sun, 7 Jun 2026 02:06:52 +0300
Subject: add missing mentionContainer.getAdapter().onDestroy() in ChatAttachAlert's onDestroy to prevent leaking resourceProvider (and the ChatActivity along with it)

---
 .../main/java/org/telegram/ui/Components/ChatAttachAlert.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
@@ -6159,6 +6159,9 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
         if (topCommentTextView != null) {
             topCommentTextView.onDestroy();
         }
+        if (mentionContainer != null && mentionContainer.getAdapter() != null) {
+            mentionContainer.getAdapter().onDestroy();
+        }
     }
 
     @Override
