From e9520a2de59153f7bc90cf497dcac95c114cdd5d Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 1 Jul 2019 19:24:41 +0200 Subject: [PATCH] Fixed build --- Watch/Extension/TGNotificationController.m | 6 ++---- .../TelegramUI/ChatMessageAnimatedStickerItemNode.swift | 7 ++++++- .../TelegramUI/TelegramUI/HorizontalStickerGridItem.swift | 2 +- .../TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Watch/Extension/TGNotificationController.m b/Watch/Extension/TGNotificationController.m index d5260db5f2..b775ddfd15 100644 --- a/Watch/Extension/TGNotificationController.m +++ b/Watch/Extension/TGNotificationController.m @@ -87,9 +87,7 @@ } } } - if (bodyText != nil) { - [self processMessageWithUserInfo:remoteNotification defaultTitle:titleText defaultBody:bodyText completion:completionHandler]; - } + [self processMessageWithUserInfo:remoteNotification defaultTitle:titleText defaultBody:bodyText completion:completionHandler]; } - (void)processMessageWithUserInfo:(NSDictionary *)userInfo defaultTitle:(NSString *)defaultTitle defaultBody:(NSString *)defaultBody completion:(void (^)(WKUserNotificationInterfaceType))completionHandler @@ -109,7 +107,7 @@ } int32_t messageId = [mid intValue]; - if (peerId == 0 || messageId == 0) + if (true || peerId == 0 || messageId == 0) { if (defaultTitle.length > 0){ self.nameLabel.hidden = false; diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift index 1addbf9378..eee88d5376 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift @@ -20,6 +20,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { private var shareButtonNode: HighlightableButtonNode? var telegramFile: TelegramMediaFile? + private let disposable = MetaDisposable() private let dateAndStatusNode: ChatMessageDateAndStatusNode private var replyInfoNode: ChatMessageReplyInfoNode? @@ -45,7 +46,11 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { self.addSubnode(self.animationNode) self.addSubnode(self.dateAndStatusNode) } - + + deinit { + self.disposable.dispose() + } + required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift b/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift index 4d7a290535..8515004070 100755 --- a/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift +++ b/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift @@ -107,7 +107,7 @@ final class HorizontalStickerGridItemNode: GridItemNode { animationNode.started = { [weak self] in self?.imageNode.alpha = 0.0 } - animationNode.setup(account: account, fileReference: stickerPackFileReference(item.file), width: 140, height: 140) + animationNode.setup(account: account, resource: item.file.resource, width: 140, height: 140, mode: .cached) } else { self.imageNode.alpha = 1.0 self.imageNode.setSignal(chatMessageSticker(account: account, file: item.file, small: true)) diff --git a/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift b/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift index f483b97882..4a7a78fa5a 100644 --- a/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift +++ b/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift @@ -111,7 +111,7 @@ private final class TrendingTopItemNode: ASDisplayNode { animationNode.started = { [weak self] in self?.imageNode.alpha = 0.0 } - animationNode.setup(account: account, fileReference: stickerPackFileReference(item.file), width: 140, height: 140) + animationNode.setup(account: account, resource: item.file.resource, width: 140, height: 140, mode: .cached) } else { self.imageNode.setSignal(chatMessageSticker(account: account, file: item.file, small: true, synchronousLoad: synchronousLoads), attemptSynchronously: synchronousLoads) self.loadDisposable.set(freeMediaFileResourceInteractiveFetched(account: account, fileReference: stickerPackFileReference(item.file), resource: chatMessageStickerResource(file: item.file, small: true)).start())