mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 15:37:01 +00:00
Don't try to translate ads
This commit is contained in:
parent
8876026edb
commit
1870ebd097
@ -2453,6 +2453,9 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
for i in (wideIndexRange.0 ... wideIndexRange.1) {
|
||||
switch historyView.filteredEntries[i] {
|
||||
case let .MessageEntry(message, _, _, _, _, _):
|
||||
guard message.adAttribute == nil && message.id.namespace == Namespaces.Message.Cloud else {
|
||||
continue
|
||||
}
|
||||
if !message.text.isEmpty && message.author?.id != self.context.account.peerId {
|
||||
if let translation = message.attributes.first(where: { $0 is TranslationMessageAttribute }) as? TranslationMessageAttribute, translation.toLang == translateToLanguage {
|
||||
} else {
|
||||
@ -2461,6 +2464,9 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
}
|
||||
case let .MessageGroupEntry(_, messages, _):
|
||||
for (message, _, _, _, _) in messages {
|
||||
guard message.adAttribute && message.id.namespace == Namespaces.Message.Cloud == nil else {
|
||||
continue
|
||||
}
|
||||
if !message.text.isEmpty && message.author?.id != self.context.account.peerId {
|
||||
if let translation = message.attributes.first(where: { $0 is TranslationMessageAttribute }) as? TranslationMessageAttribute, translation.toLang == translateToLanguage {
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user