diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiPacksAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiPacksAlert.java index c636d0be5..d8ab4a813 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiPacksAlert.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiPacksAlert.java @@ -941,6 +941,7 @@ public class EmojiPacksAlert extends BottomSheet implements NotificationCenter.N @Override public void dismiss() { super.dismiss(); + customEmojiPacks.recycle(); NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.startAllHeavyOperations, 4); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DownloadProgressIcon.java b/TMessagesProj/src/main/java/org/telegram/ui/DownloadProgressIcon.java index c72c7dfa2..6498f4166 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DownloadProgressIcon.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DownloadProgressIcon.java @@ -148,7 +148,7 @@ public class DownloadProgressIcon extends View implements NotificationCenter.Not protected void onDetachedFromWindow() { super.onDetachedFromWindow(); detachCurrentListeners(); - NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.onDownloadingFilesChanged); + NotificationCenter.getInstance(currentAccount).removeObserver(this, NotificationCenter.onDownloadingFilesChanged); downloadImageReceiver.onDetachedFromWindow(); downloadCompleteImageReceiver.onDetachedFromWindow(); }