Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2021-09-09 23:52:29 +03:00
commit 3038c9c3f1
4 changed files with 18 additions and 3 deletions

View File

@ -6803,6 +6803,10 @@ Ads should no longer be synonymous with abuse of user privacy. Let us redefine h
"Conversation.ContextMenuSeen_1" = "1 Seen";
"Conversation.ContextMenuSeen_any" = "%@ Seen";
"Conversation.ContextMenuListened_1" = "1 Listened";
"Conversation.ContextMenuListened_any" = "%@ Listened";
"Conversation.ContextMenuWatched_1" = "1 Watched";
"Conversation.ContextMenuWatched_any" = "%@ Watched";
"Conversation.ContextMenuNoViews" = "Nobody Viewed";
"Conversation.ContextMenuNobodyListened" = "Nobody Listened";

View File

@ -260,7 +260,7 @@ private class AdMessagesHistoryContextImpl {
self.state.set(CachedState.getCached(postbox: account.postbox, peerId: peerId)
|> mapToSignal { cachedState -> Signal<State, NoError> in
if false, let cachedState = cachedState, cachedState.timestamp >= Int32(Date().timeIntervalSince1970) - 5 * 60 {
if let cachedState = cachedState, cachedState.timestamp >= Int32(Date().timeIntervalSince1970) - 5 * 60 {
return account.postbox.transaction { transaction -> State in
return State(messages: cachedState.messages.map { message in
return message.toMessage(peerId: peerId, transaction: transaction)

View File

@ -1886,7 +1886,18 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus
} else if currentStats.peers.count == 1 {
self.textNode.attributedText = NSAttributedString(string: currentStats.peers[0].displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder), font: textFont, textColor: self.presentationData.theme.contextMenu.primaryColor)
} else {
self.textNode.attributedText = NSAttributedString(string: self.presentationData.strings.Conversation_ContextMenuSeen(Int32(currentStats.peers.count)), font: textFont, textColor: self.presentationData.theme.contextMenu.primaryColor)
var text = self.presentationData.strings.Conversation_ContextMenuSeen(Int32(currentStats.peers.count))
for media in self.item.message.media {
if let file = media as? TelegramMediaFile {
if file.isVoice {
text = self.presentationData.strings.Conversation_ContextMenuListened(Int32(currentStats.peers.count))
} else if file.isInstantVideo {
text = self.presentationData.strings.Conversation_ContextMenuWatched(Int32(currentStats.peers.count))
}
}
}
self.textNode.attributedText = NSAttributedString(string: text, font: textFont, textColor: self.presentationData.theme.contextMenu.primaryColor)
}
} else {
self.textNode.attributedText = NSAttributedString(string: " ", font: textFont, textColor: self.presentationData.theme.contextMenu.primaryColor)

View File

@ -1,5 +1,5 @@
{
"app": "8.0",
"app": "8.0.1",
"bazel": "4.0.0",
"xcode": "12.5.1"
}