mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Various Fixes
This commit is contained in:
parent
d370927b9e
commit
d1364c9f82
@ -5961,7 +5961,7 @@ Sorry for the inconvenience.";
|
||||
"ChatImportActivity.ErrorGeneric" = "An error occurred.";
|
||||
"ChatImportActivity.Success" = "Chat imported\nsuccessfully.";
|
||||
|
||||
"VoiceOver.Chat.GoToOriginalMessage" = "Go to original message";
|
||||
"VoiceOver.Chat.GoToOriginalMessage" = "Go to message";
|
||||
"VoiceOver.Chat.UnreadMessages_0" = "%@ unread messages";
|
||||
"VoiceOver.Chat.UnreadMessages_1" = "%@ unread message";
|
||||
"VoiceOver.Chat.UnreadMessages_2" = "%@ unread messages";
|
||||
@ -5974,3 +5974,7 @@ Sorry for the inconvenience.";
|
||||
"VoiceOver.ChatList.MessageFrom" = "From: %@";
|
||||
"VoiceOver.ChatList.MessageRead" = "Read";
|
||||
"VoiceOver.ChatList.MessageEmpty" = "Empty";
|
||||
|
||||
"VoiceOver.Chat.Profile" = "Profile";
|
||||
"VoiceOver.Chat.GroupInfo" = "Group Info";
|
||||
"VoiceOver.Chat.ChannelInfo" = "Channel Info";
|
||||
|
@ -479,15 +479,20 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
switch item.content {
|
||||
case .groupReference:
|
||||
return nil
|
||||
case let .peer(peer):
|
||||
guard let chatMainPeer = peer.peer.chatMainPeer else {
|
||||
case let .peer(_, peer, combinedReadState, _, _, _, _, _, _, _, _, _):
|
||||
guard let chatMainPeer = peer.chatMainPeer else {
|
||||
return nil
|
||||
}
|
||||
var result = ""
|
||||
if item.context.account.peerId == chatMainPeer.id {
|
||||
return item.presentationData.strings.DialogList_SavedMessages
|
||||
result += item.presentationData.strings.DialogList_SavedMessages
|
||||
} else {
|
||||
return chatMainPeer.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)
|
||||
result += chatMainPeer.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)
|
||||
}
|
||||
if let combinedReadState = combinedReadState, combinedReadState.count > 0 {
|
||||
result += "\n\(item.presentationData.strings.VoiceOver_Chat_UnreadMessages(combinedReadState.count))"
|
||||
}
|
||||
return result
|
||||
}
|
||||
} set(value) {
|
||||
}
|
||||
@ -501,19 +506,19 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
switch item.content {
|
||||
case .groupReference:
|
||||
return nil
|
||||
case let .peer(peer):
|
||||
if let message = peer.messages.last {
|
||||
case let .peer(messages, peer, combinedReadState, _, _, _, _, _, _, _, _, _):
|
||||
if let message = messages.last {
|
||||
var result = ""
|
||||
if message.flags.contains(.Incoming) {
|
||||
result += item.presentationData.strings.VoiceOver_ChatList_Message
|
||||
} else {
|
||||
result += item.presentationData.strings.VoiceOver_ChatList_OutgoingMessage
|
||||
}
|
||||
let (_, initialHideAuthor, messageText) = chatListItemStrings(strings: item.presentationData.strings, nameDisplayOrder: item.presentationData.nameDisplayOrder, messages: peer.messages, chatPeer: peer.peer, accountPeerId: item.context.account.peerId, isPeerGroup: false)
|
||||
let (_, initialHideAuthor, messageText) = chatListItemStrings(strings: item.presentationData.strings, nameDisplayOrder: item.presentationData.nameDisplayOrder, messages: messages, chatPeer: peer, accountPeerId: item.context.account.peerId, isPeerGroup: false)
|
||||
if message.flags.contains(.Incoming), !initialHideAuthor, let author = message.author, author is TelegramUser {
|
||||
result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).0)"
|
||||
}
|
||||
if !message.flags.contains(.Incoming), let combinedReadState = peer.combinedReadState, combinedReadState.isOutgoingMessageIndexRead(message.index) {
|
||||
if !message.flags.contains(.Incoming), let combinedReadState = combinedReadState, combinedReadState.isOutgoingMessageIndexRead(message.index) {
|
||||
result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageRead)"
|
||||
}
|
||||
result += "\n\(messageText)"
|
||||
|
@ -279,7 +279,7 @@ open class GalleryControllerNode: ASDisplayNode, UIScrollViewDelegate, UIGesture
|
||||
}
|
||||
|
||||
open func setControlsHidden(_ hidden: Bool, animated: Bool) {
|
||||
guard self.areControlsHidden != hidden else {
|
||||
guard self.areControlsHidden != hidden && (!self.isDismissed || hidden) else {
|
||||
return
|
||||
}
|
||||
self.areControlsHidden = hidden
|
||||
|
@ -608,7 +608,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
|
||||
}
|
||||
case .privateChannel:
|
||||
let invite = (view.cachedData as? CachedChannelData)?.exportedInvitation
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_PermanentLink.uppercased()))
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_InviteLink.uppercased()))
|
||||
entries.append(.privateLink(presentationData.theme, invite, mode != .initialSetup))
|
||||
if isGroup {
|
||||
entries.append(.privateLinkInfo(presentationData.theme, presentationData.strings.Group_Username_CreatePrivateLinkHelp))
|
||||
@ -627,7 +627,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
|
||||
switch mode {
|
||||
case .privateLink:
|
||||
let invite = (view.cachedData as? CachedGroupData)?.exportedInvitation
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_PermanentLink.uppercased()))
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_InviteLink.uppercased()))
|
||||
entries.append(.privateLink(presentationData.theme, invite, mode != .initialSetup))
|
||||
entries.append(.privateLinkInfo(presentationData.theme, presentationData.strings.GroupInfo_InviteLink_Help))
|
||||
// switch mode {
|
||||
@ -726,7 +726,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
|
||||
}
|
||||
case .privateChannel:
|
||||
let invite = (view.cachedData as? CachedGroupData)?.exportedInvitation
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_PermanentLink.uppercased()))
|
||||
entries.append(.privateLinkHeader(presentationData.theme, presentationData.strings.InviteLink_InviteLink.uppercased()))
|
||||
entries.append(.privateLink(presentationData.theme, invite, mode != .initialSetup))
|
||||
entries.append(.privateLinkInfo(presentationData.theme, presentationData.strings.Group_Username_CreatePrivateLinkHelp))
|
||||
// switch mode {
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -143,9 +143,11 @@ final class ChatMessageCommentFooterContentNode: ChatMessageBubbleContentNode {
|
||||
let rawSegments: [AnimatedCountLabelNode.Segment]
|
||||
let rawAlternativeSegments: [AnimatedCountLabelNode.Segment]
|
||||
|
||||
var accessibilityLabel = ""
|
||||
if item.message.id.peerId.isReplies {
|
||||
rawSegments = [.text(100, NSAttributedString(string: item.presentationData.strings.Conversation_ViewReply, font: textFont, textColor: messageTheme.accentTextColor))]
|
||||
rawAlternativeSegments = rawSegments
|
||||
accessibilityLabel = item.presentationData.strings.Conversation_ViewReply
|
||||
} else if dateReplies > 0 {
|
||||
var commentsPart = item.presentationData.strings.Conversation_MessageViewComments(Int32(dateReplies))
|
||||
if commentsPart.contains("[") && commentsPart.contains("]") {
|
||||
@ -190,9 +192,11 @@ final class ChatMessageCommentFooterContentNode: ChatMessageBubbleContentNode {
|
||||
|
||||
rawSegments = segments
|
||||
rawAlternativeSegments = rawSegments
|
||||
accessibilityLabel = rawText
|
||||
} else {
|
||||
rawSegments = [.text(100, NSAttributedString(string: item.presentationData.strings.Conversation_MessageLeaveComment, font: textFont, textColor: messageTheme.accentTextColor))]
|
||||
rawAlternativeSegments = [.text(100, NSAttributedString(string: item.presentationData.strings.Conversation_MessageLeaveCommentShort, font: textFont, textColor: messageTheme.accentTextColor))]
|
||||
accessibilityLabel = item.presentationData.strings.Conversation_MessageLeaveComment
|
||||
}
|
||||
|
||||
let imageSize: CGFloat = 30.0
|
||||
@ -256,6 +260,8 @@ final class ChatMessageCommentFooterContentNode: ChatMessageBubbleContentNode {
|
||||
strongSelf.countNode.isHidden = countLayout.isTruncated
|
||||
strongSelf.alternativeCountNode.isHidden = !strongSelf.countNode.isHidden
|
||||
|
||||
strongSelf.buttonNode.accessibilityLabel = accessibilityLabel
|
||||
|
||||
let _ = countApply(animation.isAnimated)
|
||||
let _ = alternativeCountApply(animation.isAnimated)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user