From dc6bb4254c0b39b505a91aaa5ed3a2fb6f93e07d Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 1 Nov 2023 22:23:44 +0400 Subject: [PATCH] Fix leaks --- .../Sources/ChatMessageInteractiveFileNode.swift | 2 ++ .../Sources/ChatMessageInteractiveInstantVideoNode.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift index 25bbee8956..bf42b0daea 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift @@ -439,6 +439,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { guard let strongSelf = self else { return } + strongSelf.transcribeDisposable?.dispose() strongSelf.transcribeDisposable = nil }) } else { @@ -447,6 +448,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { guard let strongSelf = self else { return } + strongSelf.transcribeDisposable?.dispose() strongSelf.transcribeDisposable = nil }) } diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveInstantVideoNode/Sources/ChatMessageInteractiveInstantVideoNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveInstantVideoNode/Sources/ChatMessageInteractiveInstantVideoNode.swift index 82efafc83a..63cb453c9d 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveInstantVideoNode/Sources/ChatMessageInteractiveInstantVideoNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveInstantVideoNode/Sources/ChatMessageInteractiveInstantVideoNode.swift @@ -198,6 +198,7 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode { self.playbackStatusDisposable.dispose() self.playerStatusDisposable.dispose() self.fetchedThumbnailDisposable.dispose() + self.transcribeDisposable?.dispose() } override public func didLoad() { @@ -1670,6 +1671,7 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode { guard let strongSelf = self else { return } + strongSelf.transcribeDisposable?.dispose() strongSelf.transcribeDisposable = nil }) }