mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Various improvements
This commit is contained in:
parent
9591394c24
commit
6eb222809d
@ -10850,3 +10850,16 @@ Sorry for the inconvenience.";
|
|||||||
|
|
||||||
"Chat.TapToPlayVoiceMessageOnceTooltip" = "Tap to set this message to **Play Once**";
|
"Chat.TapToPlayVoiceMessageOnceTooltip" = "Tap to set this message to **Play Once**";
|
||||||
"Chat.PlayVoiceMessageOnceTooltip" = "The recipients will be able to listen to it only once.";
|
"Chat.PlayVoiceMessageOnceTooltip" = "The recipients will be able to listen to it only once.";
|
||||||
|
|
||||||
|
"ChatList.AuthorHidden" = "Author Hidden";
|
||||||
|
"SavedMessages.SubChatDeleted" = "Saved messages deleted.";
|
||||||
|
"PeerInfo.SavedMessagesTabTitle" = "Saved";
|
||||||
|
|
||||||
|
"Chat.PanelStatusAuthorHidden" = "Senders of these messages restricted to link\ntheir name when forwarding.";
|
||||||
|
"Chat.SavedMessagesChatsTooltip" = "Tap to view your Saved Messages organized by type or source";
|
||||||
|
|
||||||
|
"Chat.ConfirmationRemoveFromSavedMessages" = "Remove from Saved Messages";
|
||||||
|
|
||||||
|
"Premium.MaxSavedPinsText" = "Sorry, you can't pin more than **%1$@** chats to the top. Unpin some that are currently pinned or subscribe to **Telegram Premium** to double the limit to **%2$@** chats.";
|
||||||
|
"Premium.MaxSavedPinsNoPremiumText" = "Sorry, you can't pin more than **%@** chats to the top. Unpin some that are currently pinned.";
|
||||||
|
"Premium.MaxSavedPinsFinalText" = "Sorry, you can't pin more than **%@** chats to the top. Unpin some that are currently pinned.";
|
||||||
|
@ -1418,8 +1418,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
|||||||
PeerIndexNameRepresentation.title(title: presentationData.strings.DialogList_SavedMessages.lowercased(), addressNames: [])
|
PeerIndexNameRepresentation.title(title: presentationData.strings.DialogList_SavedMessages.lowercased(), addressNames: [])
|
||||||
],
|
],
|
||||||
PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(2666000)): [
|
PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(2666000)): [
|
||||||
//TODO:localize
|
PeerIndexNameRepresentation.title(title: presentationData.strings.ChatList_AuthorHidden.lowercased(), addressNames: [])
|
||||||
PeerIndexNameRepresentation.title(title: "author hidden", addressNames: [])
|
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
|> map { peers -> (peers: [EngineRenderedPeer], unread: [EnginePeer.Id: (Int32, Bool)], recentlySearchedPeerIds: Set<EnginePeer.Id>) in
|
|> map { peers -> (peers: [EngineRenderedPeer], unread: [EnginePeer.Id: (Int32, Bool)], recentlySearchedPeerIds: Set<EnginePeer.Id>) in
|
||||||
|
@ -2306,8 +2306,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
} else if let id = itemPeer.chatMainPeer?.id, id.isReplies {
|
} else if let id = itemPeer.chatMainPeer?.id, id.isReplies {
|
||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: titleFont, textColor: theme.titleColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: titleFont, textColor: theme.titleColor)
|
||||||
} else if let id = itemPeer.chatMainPeer?.id, id.isAnonymousSavedMessages {
|
} else if let id = itemPeer.chatMainPeer?.id, id.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_AuhtorHidden, font: titleFont, textColor: theme.titleColor)
|
||||||
titleAttributedString = NSAttributedString(string: "Author Hidden", font: titleFont, textColor: theme.titleColor)
|
|
||||||
} else if let displayTitle = itemPeer.chatMainPeer?.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) {
|
} else if let displayTitle = itemPeer.chatMainPeer?.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) {
|
||||||
let textColor: UIColor
|
let textColor: UIColor
|
||||||
if case let .chatList(index) = item.index, index.messageIndex.id.peerId.namespace == Namespaces.Peer.SecretChat {
|
if case let .chatList(index) = item.index, index.messageIndex.id.peerId.namespace == Namespaces.Peer.SecretChat {
|
||||||
|
@ -784,8 +784,7 @@ public class ContactsPeerItemNode: ItemListRevealOptionsItemNode {
|
|||||||
} else if peer.id.isReplies {
|
} else if peer.id.isReplies {
|
||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: titleBoldFont, textColor: textColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: titleBoldFont, textColor: textColor)
|
||||||
} else if peer.id.isAnonymousSavedMessages {
|
} else if peer.id.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_AuthorHidden, font: titleBoldFont, textColor: textColor)
|
||||||
titleAttributedString = NSAttributedString(string: "Author Hidden", font: titleBoldFont, textColor: textColor)
|
|
||||||
} else if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty, !lastName.isEmpty {
|
} else if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty, !lastName.isEmpty {
|
||||||
let string = NSMutableAttributedString()
|
let string = NSMutableAttributedString()
|
||||||
switch item.displayOrder {
|
switch item.displayOrder {
|
||||||
|
@ -133,7 +133,6 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
|
|||||||
text = strings.ChatList_DeleteChatConfirmation(peer.displayTitle(strings: strings, displayOrder: nameOrder))
|
text = strings.ChatList_DeleteChatConfirmation(peer.displayTitle(strings: strings, displayOrder: nameOrder))
|
||||||
}
|
}
|
||||||
case .deleteSavedPeer:
|
case .deleteSavedPeer:
|
||||||
//TODO:localize
|
|
||||||
let peerTitle = peer.displayTitle(strings: strings, displayOrder: nameOrder)
|
let peerTitle = peer.displayTitle(strings: strings, displayOrder: nameOrder)
|
||||||
text = strings.ChatList_DeleteSavedPeerConfirmation(peerTitle)
|
text = strings.ChatList_DeleteSavedPeerConfirmation(peerTitle)
|
||||||
case let .clearHistory(canClearCache):
|
case let .clearHistory(canClearCache):
|
||||||
|
@ -1042,8 +1042,7 @@ public class ItemListPeerItemNode: ItemListRevealOptionsItemNode, ItemListItemNo
|
|||||||
} else if item.peer.id.isReplies {
|
} else if item.peer.id.isReplies {
|
||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: currentBoldFont, textColor: titleColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Replies, font: currentBoldFont, textColor: titleColor)
|
||||||
} else if item.peer.id.isAnonymousSavedMessages {
|
} else if item.peer.id.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_AuthorHidden, font: currentBoldFont, textColor: titleColor)
|
||||||
titleAttributedString = NSAttributedString(string: "Author Hidden", font: currentBoldFont, textColor: titleColor)
|
|
||||||
} else if case let .user(user) = item.peer {
|
} else if case let .user(user) = item.peer {
|
||||||
if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty, !lastName.isEmpty {
|
if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty, !lastName.isEmpty {
|
||||||
let string = NSMutableAttributedString()
|
let string = NSMutableAttributedString()
|
||||||
|
@ -1026,12 +1026,11 @@ private final class LimitSheetContent: CombinedComponent {
|
|||||||
string = strings.Premium_MaxPinsNoPremiumText("\(limit)").string
|
string = strings.Premium_MaxPinsNoPremiumText("\(limit)").string
|
||||||
}
|
}
|
||||||
case .pinnedSavedPeers:
|
case .pinnedSavedPeers:
|
||||||
//TODO:localize
|
|
||||||
let limit = state.limits.maxPinnedSavedChatCount
|
let limit = state.limits.maxPinnedSavedChatCount
|
||||||
let premiumLimit = state.premiumLimits.maxPinnedSavedChatCount
|
let premiumLimit = state.premiumLimits.maxPinnedSavedChatCount
|
||||||
iconName = "Premium/Pin"
|
iconName = "Premium/Pin"
|
||||||
badgeText = "\(component.count)"
|
badgeText = "\(component.count)"
|
||||||
string = component.count >= premiumLimit ? strings.Premium_MaxPinsFinalText("\(premiumLimit)").string : strings.Premium_MaxPinsText("\(limit)", "\(premiumLimit)").string
|
string = component.count >= premiumLimit ? strings.Premium_MaxSavedPinsFinalText("\(premiumLimit)").string : strings.Premium_MaxSavedPinsText("\(limit)", "\(premiumLimit)").string
|
||||||
defaultValue = component.count > limit ? "\(limit)" : ""
|
defaultValue = component.count > limit ? "\(limit)" : ""
|
||||||
premiumValue = component.count >= premiumLimit ? "" : "\(premiumLimit)"
|
premiumValue = component.count >= premiumLimit ? "" : "\(premiumLimit)"
|
||||||
badgePosition = max(0.15, min(0.85, CGFloat(component.count) / CGFloat(premiumLimit)))
|
badgePosition = max(0.15, min(0.85, CGFloat(component.count) / CGFloat(premiumLimit)))
|
||||||
@ -1040,7 +1039,7 @@ private final class LimitSheetContent: CombinedComponent {
|
|||||||
|
|
||||||
if isPremiumDisabled {
|
if isPremiumDisabled {
|
||||||
badgeText = "\(limit)"
|
badgeText = "\(limit)"
|
||||||
string = strings.Premium_MaxPinsNoPremiumText("\(limit)").string
|
string = strings.Premium_MaxSavedPinsNoPremiumText("\(limit)").string
|
||||||
}
|
}
|
||||||
case .files:
|
case .files:
|
||||||
let limit = Int64(state.limits.maxUploadFileParts) * 512 * 1024 + 1024 * 1024 * 100
|
let limit = Int64(state.limits.maxUploadFileParts) * 512 * 1024 + 1024 * 1024 * 100
|
||||||
|
@ -26,8 +26,7 @@ public func stringForFullAuthorName(message: EngineMessage, strings: Presentatio
|
|||||||
if message.id.peerId == accountPeerId {
|
if message.id.peerId == accountPeerId {
|
||||||
authorString = [strings.DialogList_SavedMessages]
|
authorString = [strings.DialogList_SavedMessages]
|
||||||
} else if message.id.peerId.isAnonymousSavedMessages {
|
} else if message.id.peerId.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
authorString = [strings.ChatList_AuthorHidden]
|
||||||
authorString = ["Author Hidden"]
|
|
||||||
} else if message.flags.contains(.Incoming) {
|
} else if message.flags.contains(.Incoming) {
|
||||||
authorString = [peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)]
|
authorString = [peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)]
|
||||||
} else {
|
} else {
|
||||||
|
@ -248,8 +248,7 @@ public final class ChatTitleView: UIView, NavigationBarTitleView {
|
|||||||
} else if peerView.peerId == self.context.account.peerId {
|
} else if peerView.peerId == self.context.account.peerId {
|
||||||
segments = [.text(0, NSAttributedString(string: self.strings.Conversation_SavedMessages, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
segments = [.text(0, NSAttributedString(string: self.strings.Conversation_SavedMessages, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
||||||
} else if peerView.peerId.isAnonymousSavedMessages {
|
} else if peerView.peerId.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
segments = [.text(0, NSAttributedString(string: self.strings.ChatList_AuthorHidden, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
||||||
segments = [.text(0, NSAttributedString(string: "Author Hidden", font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
|
||||||
} else {
|
} else {
|
||||||
if !peerView.isContact, let user = peer as? TelegramUser, !user.flags.contains(.isSupport), user.botInfo == nil, let phone = user.phone, !phone.isEmpty {
|
if !peerView.isContact, let user = peer as? TelegramUser, !user.flags.contains(.isSupport), user.botInfo == nil, let phone = user.phone, !phone.isEmpty {
|
||||||
segments = [.text(0, NSAttributedString(string: formatPhoneNumber(context: self.context, number: phone), font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
segments = [.text(0, NSAttributedString(string: formatPhoneNumber(context: self.context, number: phone), font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
||||||
|
@ -225,8 +225,7 @@ public final class PeerInfoChatListPaneNode: ASDisplayNode, PeerInfoPaneNode, UI
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
//TODO:localize
|
self.parentController?.present(UndoOverlayController(presentationData: self.context.sharedContext.currentPresentationData.with { $0 }, content: .removedChat(title: self.presentationData.strings.SavedMessages_SubChatDeleted, text: nil), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] value in
|
||||||
self.parentController?.present(UndoOverlayController(presentationData: self.context.sharedContext.currentPresentationData.with { $0 }, content: .removedChat(title: "Saved messages deleted.", text: nil), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] value in
|
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -969,8 +969,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
if peer.id == self.context.account.peerId && !self.isSettings {
|
if peer.id == self.context.account.peerId && !self.isSettings {
|
||||||
title = presentationData.strings.Conversation_SavedMessages
|
title = presentationData.strings.Conversation_SavedMessages
|
||||||
} else if peer.id.isAnonymousSavedMessages {
|
} else if peer.id.isAnonymousSavedMessages {
|
||||||
//TODO:localize
|
title = presentationData.strings.ChatList_AuthorHidden
|
||||||
title = "Author Hidden"
|
|
||||||
} else if let threadData = threadData {
|
} else if let threadData = threadData {
|
||||||
title = threadData.info.title
|
title = threadData.info.title
|
||||||
} else {
|
} else {
|
||||||
|
@ -1012,8 +1012,7 @@ final class PeerInfoPaneContainerNode: ASDisplayNode, UIGestureRecognizerDelegat
|
|||||||
case .savedMessagesChats:
|
case .savedMessagesChats:
|
||||||
title = presentationData.strings.DialogList_TabTitle
|
title = presentationData.strings.DialogList_TabTitle
|
||||||
case .savedMessages:
|
case .savedMessages:
|
||||||
//TODO:localize
|
title = presentationData.strings.PeerInfo_SavedMessagesTabTitle
|
||||||
title = "Saved"
|
|
||||||
}
|
}
|
||||||
return PeerInfoPaneSpecifier(key: key, title: title)
|
return PeerInfoPaneSpecifier(key: key, title: title)
|
||||||
}, selectedPane: self.currentPaneKey, transitionFraction: self.transitionFraction, transition: transition)
|
}, selectedPane: self.currentPaneKey, transitionFraction: self.transitionFraction, transition: transition)
|
||||||
|
@ -7216,6 +7216,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}
|
}
|
||||||
if case .peer(self.context.account.peerId) = self.chatLocation {
|
if case .peer(self.context.account.peerId) = self.chatLocation {
|
||||||
var didDisplayTooltip = false
|
var didDisplayTooltip = false
|
||||||
|
if "".isEmpty {
|
||||||
|
didDisplayTooltip = true
|
||||||
|
}
|
||||||
self.chatDisplayNode.historyNode.hasLotsOfMessagesUpdated = { [weak self] hasLotsOfMessages in
|
self.chatDisplayNode.historyNode.hasLotsOfMessagesUpdated = { [weak self] hasLotsOfMessages in
|
||||||
guard let self, hasLotsOfMessages else {
|
guard let self, hasLotsOfMessages else {
|
||||||
return
|
return
|
||||||
@ -7237,8 +7240,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: self.presentationData.strings.Chat_SavedMessagesChatsTooltip), location: .point(navigationBar.frame, .top), displayDuration: .manual, shouldDismissOnTouch: { point, _ in
|
||||||
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: "Tap to view your Saved Messages organized by type or source"), location: .point(navigationBar.frame, .top), displayDuration: .manual, shouldDismissOnTouch: { point, _ in
|
|
||||||
return .ignore
|
return .ignore
|
||||||
})
|
})
|
||||||
self.present(tooltipScreen, in: .current)
|
self.present(tooltipScreen, in: .current)
|
||||||
@ -17503,8 +17505,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
if options.contains(.deleteLocally) {
|
if options.contains(.deleteLocally) {
|
||||||
var localOptionText = self.presentationData.strings.Conversation_DeleteMessagesForMe
|
var localOptionText = self.presentationData.strings.Conversation_DeleteMessagesForMe
|
||||||
if self.chatLocation.peerId == self.context.account.peerId {
|
if self.chatLocation.peerId == self.context.account.peerId {
|
||||||
//TODO:localize
|
localOptionText = self.presentationData.strings.Chat_ConfirmationRemoveFromSavedMessages
|
||||||
localOptionText = "Remove from Saved Messages"
|
|
||||||
} else if case .scheduledMessages = self.presentationInterfaceState.subject {
|
} else if case .scheduledMessages = self.presentationInterfaceState.subject {
|
||||||
localOptionText = messageIds.count > 1 ? self.presentationData.strings.ScheduledMessages_DeleteMany : self.presentationData.strings.ScheduledMessages_Delete
|
localOptionText = messageIds.count > 1 ? self.presentationData.strings.ScheduledMessages_DeleteMany : self.presentationData.strings.ScheduledMessages_Delete
|
||||||
} else {
|
} else {
|
||||||
|
@ -47,8 +47,7 @@ final class ChatRestrictedInputPanelNode: ChatInputPanelNode {
|
|||||||
var iconImage: UIImage?
|
var iconImage: UIImage?
|
||||||
|
|
||||||
if case let .replyThread(message) = interfaceState.chatLocation, message.peerId == self.context?.account.peerId {
|
if case let .replyThread(message) = interfaceState.chatLocation, message.peerId == self.context?.account.peerId {
|
||||||
//TODO:localize
|
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_PanelStatusAuthorHidden, font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
|
||||||
self.textNode.attributedText = NSAttributedString(string: "Senders of these messages restricted to link\ntheir name when forwarding.", font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
|
|
||||||
} else if let threadData = interfaceState.threadData, threadData.isClosed {
|
} else if let threadData = interfaceState.threadData, threadData.isClosed {
|
||||||
iconImage = PresentationResourcesChat.chatPanelLockIcon(interfaceState.theme)
|
iconImage = PresentationResourcesChat.chatPanelLockIcon(interfaceState.theme)
|
||||||
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_PanelTopicClosedText, font: Font.regular(15.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
|
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_PanelTopicClosedText, font: Font.regular(15.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"app": "10.4.1",
|
"app": "10.5",
|
||||||
"bazel": "6.4.0",
|
"bazel": "6.4.0",
|
||||||
"xcode": "15.0",
|
"xcode": "15.0",
|
||||||
"macos": "13.0"
|
"macos": "13.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user