mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Merge branches 'master' and 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
04f8d29c01
@ -5931,22 +5931,22 @@ Sorry for the inconvenience.";
|
||||
"CallList.DeleteAllForEveryone" = "Delete for me and Others";
|
||||
"Conversation.ImportProgress" = "Importing Messages... %@%";
|
||||
|
||||
"Conversation.AudioRateTooltipSpeedUp" = "The audio will now play 2 times faster.";
|
||||
"Conversation.AudioRateTooltipNormal" = "The audio will now play at normal speed.";
|
||||
"Conversation.AudioRateTooltipSpeedUp" = "Audio will play two times faster.";
|
||||
"Conversation.AudioRateTooltipNormal" = "Audio will play at normal speed.";
|
||||
|
||||
"ChatImport.Title" = "Select Chat";
|
||||
"ChatImport.SelectionErrorNotAdmin" = "You need to be an admin of the group to import messages into it.";
|
||||
"ChatImport.SelectionErrorGroupGeneric" = "You can't import history into this group.";
|
||||
"ChatImport.SelectionConfirmationGroupWithTitle" = "Are you sure you want to import messages from **%1$@** into **%2$@**?";
|
||||
"ChatImport.SelectionConfirmationGroupWithoutTitle" = "Are you sure you want to import messages into **%@**?";
|
||||
"ChatImport.SelectionErrorNotAdmin" = "You must to be an admin in the group to import messages to it.";
|
||||
"ChatImport.SelectionErrorGroupGeneric" = "Sorry, you can't import history to this group.";
|
||||
"ChatImport.SelectionConfirmationGroupWithTitle" = "Do you want to import messages from **%1$@** into **%2$@**?";
|
||||
"ChatImport.SelectionConfirmationGroupWithoutTitle" = "Do you want to import messages into **%@**?";
|
||||
"ChatImport.SelectionConfirmationAlertTitle" = "Import Messages";
|
||||
"ChatImport.SelectionConfirmationAlertImportAction" = "Import";
|
||||
"ChatImport.CreateGroupAlertTitle" = "Create Group and Import Messages";
|
||||
"ChatImport.CreateGroupAlertText" = "Are you sure you want to create the group **%@** and import messages from another messaging app?";
|
||||
"ChatImport.CreateGroupAlertText" = "Do you want to create the group **%@** and import messages from another messaging app?";
|
||||
"ChatImport.CreateGroupAlertImportAction" = "Create and Import";
|
||||
"ChatImport.UserErrorNotMutual" = "You can only import messages into private chats with users who added you as a contact.";
|
||||
"ChatImport.SelectionConfirmationUserWithTitle" = "Import messages from **%1$@** into the chat with **%2$@**?";
|
||||
"ChatImport.SelectionConfirmationUserWithoutTitle" = "Import messages into the chat with **%@?**";
|
||||
"ChatImport.UserErrorNotMutual" = "You can only import messages into private chats with users who are mutual contacts.";
|
||||
"ChatImport.SelectionConfirmationUserWithTitle" = "Do you want to import messages from **%1$@** into the chat with **%2$@**?";
|
||||
"ChatImport.SelectionConfirmationUserWithoutTitle" = "Do you want to import messages into the chat with **%@?**";
|
||||
|
||||
"PeerSelection.ImportIntoNewGroup" = "Import to a New Group";
|
||||
"Message.ImportedDateFormat" = "%1$@, %2$@ Imported %3$@";
|
||||
@ -5954,10 +5954,10 @@ Sorry for the inconvenience.";
|
||||
"ChatImportActivity.Title" = "Importing Chat";
|
||||
"ChatImportActivity.OpenApp" = "Open Telegram";
|
||||
"ChatImportActivity.Retry" = "Retry";
|
||||
"ChatImportActivity.InProgress" = "Please keep this window open\nduring the import.";
|
||||
"ChatImportActivity.ErrorNotAdmin" = "You need to be an admin.";
|
||||
"ChatImportActivity.ErrorInvalidChatType" = "You can't import this history in this type of chat.";
|
||||
"ChatImportActivity.ErrorUserBlocked" = "This user is blocked.";
|
||||
"ChatImportActivity.InProgress" = "Please keep this window open\nuntil the import is completed.";
|
||||
"ChatImportActivity.ErrorNotAdmin" = "You need to be an admin in the group to import messages.";
|
||||
"ChatImportActivity.ErrorInvalidChatType" = "Wrong type of chat for the messages you are trying to import.";
|
||||
"ChatImportActivity.ErrorUserBlocked" = "Unable to import messages due to privacy settings.";
|
||||
"ChatImportActivity.ErrorGeneric" = "An error occurred.";
|
||||
"ChatImportActivity.Success" = "Chat imported\nsuccessfully.";
|
||||
|
||||
|
||||
@ -229,7 +229,12 @@ private final class ImportManager {
|
||||
|
||||
let uploadedEntrySignal: Signal<Float, ImportError> = unpackedFile
|
||||
|> mapToSignal { tempFile -> Signal<Float, ImportError> in
|
||||
return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, fileName: entry.0.path, mimeType: entry.1, type: entry.2)
|
||||
let pathExtension = (entry.1 as NSString).pathExtension
|
||||
var mimeType = "application/octet-stream"
|
||||
if !pathExtension.isEmpty, let value = TGMimeTypeMap.mimeType(forExtension: pathExtension) {
|
||||
mimeType = value
|
||||
}
|
||||
return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, fileName: entry.0.path, mimeType: mimeType, type: entry.2)
|
||||
|> mapError { error -> ImportError in
|
||||
switch error {
|
||||
case .chatAdminRequired:
|
||||
|
||||
@ -491,7 +491,9 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
|
||||
|
||||
|
||||
var authorNameText: String?
|
||||
if let author = message.effectiveAuthor {
|
||||
if let forwardInfo = message.forwardInfo, forwardInfo.flags.contains(.isImported), let authorSignature = forwardInfo.authorSignature {
|
||||
authorNameText = authorSignature
|
||||
} else if let author = message.effectiveAuthor {
|
||||
authorNameText = author.displayTitle(strings: self.strings, displayOrder: self.nameOrder)
|
||||
} else if let peer = message.peers[message.id.peerId] {
|
||||
authorNameText = peer.displayTitle(strings: self.strings, displayOrder: self.nameOrder)
|
||||
|
||||
@ -131,6 +131,7 @@ private func synchronizeEmojiKeywords(postbox: Postbox, transaction: Transaction
|
||||
for apiEmojiKeyword in keywords {
|
||||
switch apiEmojiKeyword {
|
||||
case let .emojiKeyword(keyword, emoticons):
|
||||
let keyword = keyword.replacingOccurrences(of: " ", with: "")
|
||||
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
||||
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: 0, id: 0), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
||||
itemsToAppend[keyword] = item
|
||||
@ -200,6 +201,7 @@ private func synchronizeEmojiKeywords(postbox: Postbox, transaction: Transaction
|
||||
var index: Int32 = 0
|
||||
for apiEmojiKeyword in keywords {
|
||||
if case let .emojiKeyword(keyword, emoticons) = apiEmojiKeyword, !emoticons.isEmpty {
|
||||
let keyword = keyword.replacingOccurrences(of: " ", with: "")
|
||||
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
||||
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: index, id: keywordCollectionItemId(keyword, inputLanguageCode: operation.inputLanguageCode)), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
||||
items.append(item)
|
||||
|
||||
@ -1251,6 +1251,8 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
|
||||
if item.effectiveAuthorId?.namespace == Namespaces.Peer.Empty {
|
||||
item.controllerInteraction.displayMessageTooltip(item.content.firstMessage.id, item.presentationData.strings.Conversation_ForwardAuthorHiddenTooltip, self, avatarNode.frame)
|
||||
} else if let forwardInfo = item.content.firstMessage.forwardInfo, forwardInfo.flags.contains(.isImported), forwardInfo.author == nil {
|
||||
item.controllerInteraction.displayImportedMessageTooltip(avatarNode)
|
||||
} else {
|
||||
if !item.message.id.peerId.isReplies, let channel = item.content.firstMessage.forwardInfo?.author as? TelegramChannel, channel.username == nil {
|
||||
if case .member = channel.participationStatus {
|
||||
|
||||
@ -818,6 +818,8 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
|
||||
|
||||
if item.effectiveAuthorId?.namespace == Namespaces.Peer.Empty {
|
||||
item.controllerInteraction.displayMessageTooltip(item.content.firstMessage.id, item.presentationData.strings.Conversation_ForwardAuthorHiddenTooltip, self, avatarNode.frame)
|
||||
} else if let forwardInfo = item.content.firstMessage.forwardInfo, forwardInfo.flags.contains(.isImported), forwardInfo.author == nil {
|
||||
item.controllerInteraction.displayImportedMessageTooltip(avatarNode)
|
||||
} else {
|
||||
if !item.message.id.peerId.isReplies, let channel = item.content.firstMessage.forwardInfo?.author as? TelegramChannel, channel.username == nil {
|
||||
if case .member = channel.participationStatus {
|
||||
|
||||
@ -729,7 +729,7 @@ public class ShareRootControllerImpl {
|
||||
let presentationData = internalContext.sharedContext.currentPresentationData.with { $0 }
|
||||
|
||||
var attemptSelectionImpl: ((Peer) -> Void)?
|
||||
let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: context, filter: [.onlyPrivateChats, .excludeDisabled, .doNotSearchMessages], hasChatListSelector: false, hasContactSelector: true, hasGlobalSearch: false, title: presentationData.strings.ChatImport_Title, attemptSelection: { peer in
|
||||
let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: context, filter: [.onlyPrivateChats, .excludeDisabled, .doNotSearchMessages, .excludeSecretChats], hasChatListSelector: false, hasContactSelector: true, hasGlobalSearch: false, title: presentationData.strings.ChatImport_Title, attemptSelection: { peer in
|
||||
attemptSelectionImpl?(peer)
|
||||
}, pretendPresentedInModal: true))
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "7.4",
|
||||
"app": "7.4.1",
|
||||
"bazel": "3.7.0",
|
||||
"xcode": "12.3"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user