Merge branch 'master' into postbox-refactoring-1

This commit is contained in:
Ali 2021-09-14 12:47:23 +04:00
commit 099f867ca1
2 changed files with 15 additions and 4 deletions

View File

@ -1937,8 +1937,19 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus
self.shimmerNode.frame = CGRect(origin: CGPoint(x: textFrame.minX, y: floor((size.height - shimmerHeight) / 2.0)), size: CGSize(width: placeholderTextSize.width, height: shimmerHeight)) self.shimmerNode.frame = CGRect(origin: CGPoint(x: textFrame.minX, y: floor((size.height - shimmerHeight) / 2.0)), size: CGSize(width: placeholderTextSize.width, height: shimmerHeight))
self.shimmerNode.cornerRadius = shimmerHeight / 2.0 self.shimmerNode.cornerRadius = shimmerHeight / 2.0
let shimmeringForegroundColor = self.presentationData.theme.contextMenu.itemSeparatorColor.blitOver(self.presentationData.theme.list.plainBackgroundColor, alpha: 0.9) let shimmeringForegroundColor: UIColor
let shimmeringColor = self.presentationData.theme.list.itemBlocksBackgroundColor.withAlphaComponent(0.2) let shimmeringColor: UIColor
if self.presentationData.theme.overallDarkAppearance {
let backgroundColor = self.presentationData.theme.contextMenu.backgroundColor.blitOver(self.presentationData.theme.list.plainBackgroundColor, alpha: 1.0)
shimmeringForegroundColor = self.presentationData.theme.contextMenu.primaryColor.blitOver(backgroundColor, alpha: 0.1)
shimmeringColor = self.presentationData.theme.list.itemBlocksBackgroundColor.withAlphaComponent(0.3)
} else {
let backgroundColor = self.presentationData.theme.contextMenu.backgroundColor.blitOver(self.presentationData.theme.list.plainBackgroundColor, alpha: 1.0)
shimmeringForegroundColor = self.presentationData.theme.contextMenu.primaryColor.blitOver(backgroundColor, alpha: 0.15)
shimmeringColor = self.presentationData.theme.list.itemBlocksBackgroundColor.withAlphaComponent(0.3)
}
self.shimmerNode.update(backgroundColor: self.presentationData.theme.list.plainBackgroundColor, foregroundColor: shimmeringForegroundColor, shimmeringColor: shimmeringColor, shapes: [.rect(rect: self.shimmerNode.bounds)], horizontal: true, size: self.shimmerNode.bounds.size) self.shimmerNode.update(backgroundColor: self.presentationData.theme.list.plainBackgroundColor, foregroundColor: shimmeringForegroundColor, shimmeringColor: shimmeringColor, shapes: [.rect(rect: self.shimmerNode.bounds)], horizontal: true, size: self.shimmerNode.bounds.size)
self.shimmerNode.updateAbsoluteRect(self.shimmerNode.frame, within: size) self.shimmerNode.updateAbsoluteRect(self.shimmerNode.frame, within: size)
transition.updateAlpha(node: self.shimmerNode, alpha: self.currentStats == nil ? 1.0 : 0.0) transition.updateAlpha(node: self.shimmerNode, alpha: self.currentStats == nil ? 1.0 : 0.0)

View File

@ -289,13 +289,13 @@ final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContentNode {
actionTitle = item.presentationData.strings.Conversation_ViewGroup actionTitle = item.presentationData.strings.Conversation_ViewGroup
case "telegram_message": case "telegram_message":
actionTitle = item.presentationData.strings.Conversation_ViewMessage actionTitle = item.presentationData.strings.Conversation_ViewMessage
case "telegram_voicechat": case "telegram_voicechat", "telegram_livestream", "telegram_videochat":
if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info { if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info {
title = item.presentationData.strings.Conversation_LiveStream title = item.presentationData.strings.Conversation_LiveStream
} else { } else {
title = item.presentationData.strings.Conversation_VoiceChat title = item.presentationData.strings.Conversation_VoiceChat
} }
if webpage.url.contains("voicechat=") { if webpage.url.contains("voicechat=") || webpage.url.contains("videochat=") || webpage.url.contains("livestream=") {
actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsSpeaker actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsSpeaker
} else { } else {
actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsListener actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsListener