mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
b04eee8289
commit
6bc1fe1939
71 changed files with 4405 additions and 643 deletions
|
|
@ -939,13 +939,13 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
|||
context?.account.viewTracker.refreshStoriesForMessageIds(messageIds: Set(messageIds.map(\.messageId)))
|
||||
}
|
||||
self.translationProcessingManager.process = { [weak self, weak context] messageIds in
|
||||
if let context = context, let translationLang = self?.translationLang {
|
||||
if let context, let translationLang = self?.translationLang {
|
||||
let _ = translateMessageIds(context: context, messageIds: Array(messageIds.map(\.messageId)), fromLang: translationLang.fromLang, toLang: translationLang.toLang).startStandalone()
|
||||
}
|
||||
}
|
||||
self.factCheckProcessingManager.process = { [weak self, weak context] messageIds in
|
||||
if let context = context, let translationLang = self?.translationLang {
|
||||
let _ = translateMessageIds(context: context, messageIds: Array(messageIds.map(\.messageId)), fromLang: translationLang.fromLang, toLang: translationLang.toLang).startStandalone()
|
||||
self.factCheckProcessingManager.process = { [weak context] messageIds in
|
||||
if let context {
|
||||
let _ = context.engine.messages.getMessagesFactCheck(messageIds: Array(messageIds.map(\.messageId))).startStandalone()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2746,6 +2746,8 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
|||
messageIdsToTranslate.append(message.id)
|
||||
} else if let _ = message.media.first(where: { $0 is TelegramMediaPoll }) {
|
||||
messageIdsToTranslate.append(message.id)
|
||||
} else if let audioTranscription = message.attributes.first(where: { $0 is AudioTranscriptionMessageAttribute }) as? AudioTranscriptionMessageAttribute, !audioTranscription.text.isEmpty && !audioTranscription.isPending {
|
||||
messageIdsToTranslate.append(message.id)
|
||||
}
|
||||
case let .MessageGroupEntry(_, messages, _):
|
||||
for (message, _, _, _, _) in messages {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue