mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Update localization and hide new features
This commit is contained in:
parent
c27cb4f532
commit
df1e522519
@ -10898,3 +10898,55 @@ Sorry for the inconvenience.";
|
|||||||
|
|
||||||
"Conversation.DiscardRecordedVoiceMessageDescription" = "Are you sure you want to discard\nyour voice message?";
|
"Conversation.DiscardRecordedVoiceMessageDescription" = "Are you sure you want to discard\nyour voice message?";
|
||||||
"Conversation.DiscardRecordedVoiceMessageAction" = "Discard";
|
"Conversation.DiscardRecordedVoiceMessageAction" = "Discard";
|
||||||
|
|
||||||
|
"DialogList.MyNotes" = "My Notes";
|
||||||
|
"Conversation.MyNotes" = "My Notes";
|
||||||
|
|
||||||
|
"Privacy.Messages.Title" = "Messages";
|
||||||
|
"Privacy.Messages.SectionTitle" = "WHO CAN SEND ME MESSAGES?";
|
||||||
|
"Privacy.Messages.ValueEveryone" = "Everybody";
|
||||||
|
"Privacy.Messages.ValueContactsAndPremium" = "My Contacts and Premium Users";
|
||||||
|
"Privacy.Messages.SectionFooter" = "You can restrict incoming messages to only contacts and Premium users.";
|
||||||
|
"Privacy.Messages.PremiumInfoFooter" = "[What is Telegram Premium?]()";
|
||||||
|
"Privacy.Messages.PremiumToast.Title" = "Premium Required";
|
||||||
|
"Privacy.Messages.PremiumToast.Text" = "Subscribe to **Telegram Premium** to select this option";
|
||||||
|
"Privacy.Messages.PremiumToast.Action" = "Add";
|
||||||
|
|
||||||
|
"Settings.Privacy.Messages" = "Messages";
|
||||||
|
"Settings.Privacy.Messages.ValueEveryone" = "Everybody";
|
||||||
|
"Settings.Privacy.Messages.ValueContactsAndPremium" = "Contacts and Premium";
|
||||||
|
|
||||||
|
"Settings.Privacy.ReadTime" = "Hide Read Time";
|
||||||
|
"Settings.Privacy.ReadTimeFooter" = "Do not show the time when you read a message to people you hid your last seen from. If you turn this on, their read time will also be hidden from you.\nThis does not affect group chats.";
|
||||||
|
|
||||||
|
"Settings.Privacy.LastSeenRevealedToast" = "Your last seen time is now visible.";
|
||||||
|
"Settings.Privacy.MessageReadTimeRevealedToast" = "Your read times are now visible.";
|
||||||
|
|
||||||
|
"Settings.Privacy.ReadTimePremium" = "Subscribe to Telegram Premium";
|
||||||
|
"Settings.Privacy.ReadTimePremiumFooter" = "It you subscribe to Telegram Premium, you will still see other users' last seen and read time even if you hid yours from them (unless they specifically restricted it).";
|
||||||
|
|
||||||
|
"Chat.ToastMessagingRestrictedToPremium.Text" = "**%@** only accepts messages from contacts and **Premium** users.";
|
||||||
|
"Chat.ToastMessagingRestrictedToPremium.Action" = "View";
|
||||||
|
|
||||||
|
"Story.MessagingRestrictedPlaceholder" = "Only Premium users can message %@.";
|
||||||
|
"Story.MessagingRestrictedPlaceholderAction" = "Learn more...";
|
||||||
|
|
||||||
|
"Chat.ContextMenuTagsTitle" = "Tag the message with an emoji for quick access later";
|
||||||
|
|
||||||
|
"Chat.ReactionContextMenu.FilterByTag" = "Fiter by Tag";
|
||||||
|
"Chat.ReactionContextMenu.RemoveTag" = "Remove Tag";
|
||||||
|
|
||||||
|
"Chat.EmptyStateMessagingRestrictedToPremium.Text" = "Subscribe to **Premium**\nto message **%@**.";
|
||||||
|
"Chat.EmptyStateMessagingRestrictedToPremium.Action" = "Add Premium";
|
||||||
|
|
||||||
|
"Chat.ContextMenuReadDate.ReadAvailablePrefix" = "read";
|
||||||
|
"Chat.ContextMenuReadDate.ReadAvailableBadge" = "show when";
|
||||||
|
"Chat.ContextMenuReadDate.ReadFormat" = "read %@";
|
||||||
|
|
||||||
|
"Chat.MessagingRestrictedPlaceholder" = "Only Premium users can message %@.";
|
||||||
|
"Chat.MessagingRestrictedPlaceholderAction" = "Learn more...";
|
||||||
|
|
||||||
|
"Chat.SearchTagsPlaceholder" = "Search messages or tags";
|
||||||
|
|
||||||
|
"Chat.TagSearchShowMessages" = "Show Other Messages";
|
||||||
|
"Chat.TagSearchHideMessages" = "Hide Other Messages";
|
||||||
|
@ -1446,8 +1446,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
|||||||
if let query {
|
if let query {
|
||||||
foundLocalPeers = context.engine.messages.searchLocalSavedMessagesPeers(query: query.lowercased(), indexNameMapping: [
|
foundLocalPeers = context.engine.messages.searchLocalSavedMessagesPeers(query: query.lowercased(), indexNameMapping: [
|
||||||
context.account.peerId: [
|
context.account.peerId: [
|
||||||
PeerIndexNameRepresentation.title(title: "my notes", addressNames: []),
|
PeerIndexNameRepresentation.title(title: presentationData.strings.DialogList_MyNotes.lowercased(), addressNames: []),
|
||||||
//TODO:localize
|
|
||||||
PeerIndexNameRepresentation.title(title: "my notes".lowercased(), addressNames: [])
|
PeerIndexNameRepresentation.title(title: "my notes".lowercased(), addressNames: [])
|
||||||
],
|
],
|
||||||
PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(2666000)): [
|
PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(2666000)): [
|
||||||
|
@ -2310,8 +2310,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_ArchivedChatsTitle, font: titleFont, textColor: theme.titleColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_ArchivedChatsTitle, font: titleFont, textColor: theme.titleColor)
|
||||||
} else if itemPeer.chatMainPeer?.id == item.context.account.peerId {
|
} else if itemPeer.chatMainPeer?.id == item.context.account.peerId {
|
||||||
if case .savedMessagesChats = item.chatListLocation {
|
if case .savedMessagesChats = item.chatListLocation {
|
||||||
//TODO:localize
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_MyNotes, font: titleFont, textColor: theme.titleColor)
|
||||||
titleAttributedString = NSAttributedString(string: "My Notes", font: titleFont, textColor: theme.titleColor)
|
|
||||||
} else {
|
} else {
|
||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_SavedMessages, font: titleFont, textColor: theme.titleColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_SavedMessages, font: titleFont, textColor: theme.titleColor)
|
||||||
}
|
}
|
||||||
|
@ -791,8 +791,7 @@ public class ContactsPeerItemNode: ItemListRevealOptionsItemNode {
|
|||||||
if case let .user(user) = peer {
|
if case let .user(user) = peer {
|
||||||
if peer.id == item.context.account.peerId, case let .generalSearch(isSavedMessages) = item.peerMode {
|
if peer.id == item.context.account.peerId, case let .generalSearch(isSavedMessages) = item.peerMode {
|
||||||
if isSavedMessages {
|
if isSavedMessages {
|
||||||
//TODO:localize
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_MyNotes, font: titleBoldFont, textColor: textColor)
|
||||||
titleAttributedString = NSAttributedString(string: "My Notes", font: titleBoldFont, textColor: textColor)
|
|
||||||
} else {
|
} else {
|
||||||
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_SavedMessages, font: titleBoldFont, textColor: textColor)
|
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_SavedMessages, font: titleBoldFont, textColor: textColor)
|
||||||
}
|
}
|
||||||
|
@ -78,14 +78,13 @@ private enum GlobalAutoremoveEntry: ItemListNodeEntry {
|
|||||||
let arguments = arguments as! IncomingMessagePrivacyScreenArguments
|
let arguments = arguments as! IncomingMessagePrivacyScreenArguments
|
||||||
switch self {
|
switch self {
|
||||||
case .header:
|
case .header:
|
||||||
//TODO:localize
|
return ItemListSectionHeaderItem(presentationData: presentationData, text: presentationData.strings.Privacy_Messages_SectionTitle, sectionId: self.section)
|
||||||
return ItemListSectionHeaderItem(presentationData: presentationData, text: "WHO CAN SEND ME MESSAGES?", sectionId: self.section)
|
|
||||||
case let .optionEverybody(value):
|
case let .optionEverybody(value):
|
||||||
return ItemListCheckboxItem(presentationData: presentationData, title: "Everybody", style: .left, checked: value, zeroSeparatorInsets: false, sectionId: self.section, action: {
|
return ItemListCheckboxItem(presentationData: presentationData, title: presentationData.strings.Privacy_Messages_ValueEveryone, style: .left, checked: value, zeroSeparatorInsets: false, sectionId: self.section, action: {
|
||||||
arguments.updateValue(false)
|
arguments.updateValue(false)
|
||||||
})
|
})
|
||||||
case let .optionPremium(value, isEnabled):
|
case let .optionPremium(value, isEnabled):
|
||||||
return ItemListCheckboxItem(presentationData: presentationData, icon: isEnabled ? nil : generateTintedImage(image: UIImage(bundleImageName: "Chat/Stickers/Lock"), color: presentationData.theme.list.itemSecondaryTextColor), iconPlacement: .check, title: "My Contacts and Premium Users", style: .left, checked: isEnabled && value, zeroSeparatorInsets: false, sectionId: self.section, action: {
|
return ItemListCheckboxItem(presentationData: presentationData, icon: isEnabled ? nil : generateTintedImage(image: UIImage(bundleImageName: "Chat/Stickers/Lock"), color: presentationData.theme.list.itemSecondaryTextColor), iconPlacement: .check, title: presentationData.strings.Privacy_Messages_ValueContactsAndPremium, style: .left, checked: isEnabled && value, zeroSeparatorInsets: false, sectionId: self.section, action: {
|
||||||
if isEnabled {
|
if isEnabled {
|
||||||
arguments.updateValue(true)
|
arguments.updateValue(true)
|
||||||
} else {
|
} else {
|
||||||
@ -93,11 +92,9 @@ private enum GlobalAutoremoveEntry: ItemListNodeEntry {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
case .footer:
|
case .footer:
|
||||||
//TODO:localize
|
return ItemListTextItem(presentationData: presentationData, text: .plain(presentationData.strings.Privacy_Messages_SectionFooter), sectionId: self.section)
|
||||||
return ItemListTextItem(presentationData: presentationData, text: .plain("You can restrict incoming messages to only contacts and Premium users."), sectionId: self.section)
|
|
||||||
case .info:
|
case .info:
|
||||||
//TODO:localize
|
return ItemListTextItem(presentationData: presentationData, text: .markdown(presentationData.strings.Privacy_Messages_PremiumInfoFooter), sectionId: self.section, linkAction: { _ in
|
||||||
return ItemListTextItem(presentationData: presentationData, text: .markdown("[What is Telegram Premium?]()"), sectionId: self.section, linkAction: { _ in
|
|
||||||
arguments.infoLinkAction()
|
arguments.infoLinkAction()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -155,7 +152,7 @@ public func incomingMessagePrivacyScreen(context: AccountContext, value: Bool, u
|
|||||||
},
|
},
|
||||||
disabledValuePressed: {
|
disabledValuePressed: {
|
||||||
let presentationData = context.sharedContext.currentPresentationData.with({ $0 })
|
let presentationData = context.sharedContext.currentPresentationData.with({ $0 })
|
||||||
presentInCurrentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: "Premium Required", text: "Subscribe to **Telegram Premium** to select this option", customUndoText: "Add", timeout: nil, linkAction: { _ in
|
presentInCurrentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: presentationData.strings.Privacy_Messages_PremiumToast_Title, text: presentationData.strings.Privacy_Messages_PremiumToast_Text, customUndoText: presentationData.strings.Privacy_Messages_PremiumToast_Action, timeout: nil, linkAction: { _ in
|
||||||
}), elevatedLayout: false, action: { action in
|
}), elevatedLayout: false, action: { action in
|
||||||
if case .undo = action {
|
if case .undo = action {
|
||||||
let controller = PremiumIntroScreen(context: context, source: .settings)
|
let controller = PremiumIntroScreen(context: context, source: .settings)
|
||||||
@ -180,8 +177,7 @@ public func incomingMessagePrivacyScreen(context: AccountContext, value: Bool, u
|
|||||||
|> map { presentationData, accountPeer, state -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
|> map { presentationData, accountPeer, state -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
||||||
let rightNavigationButton: ItemListNavigationButton? = nil
|
let rightNavigationButton: ItemListNavigationButton? = nil
|
||||||
|
|
||||||
//TODO:localize
|
let title: ItemListControllerTitle = .text(presentationData.strings.Privacy_Messages_Title)
|
||||||
let title: ItemListControllerTitle = .text("Messages")
|
|
||||||
|
|
||||||
let entries: [GlobalAutoremoveEntry] = incomingMessagePrivacyScreenEntries(presentationData: presentationData, state: state, isPremium: accountPeer?.isPremium ?? false)
|
let entries: [GlobalAutoremoveEntry] = incomingMessagePrivacyScreenEntries(presentationData: presentationData, state: state, isPremium: accountPeer?.isPremium ?? false)
|
||||||
|
|
||||||
|
@ -395,8 +395,7 @@ private enum PrivacyAndSecurityEntry: ItemListNodeEntry {
|
|||||||
arguments.openVoiceMessagePrivacy()
|
arguments.openVoiceMessagePrivacy()
|
||||||
})
|
})
|
||||||
case let .messagePrivacy(value):
|
case let .messagePrivacy(value):
|
||||||
//TODO:localize
|
return ItemListDisclosureItem(presentationData: presentationData, title: presentationData.strings.Settings_Privacy_Messages, label: !value ? presentationData.strings.Settings_Privacy_Messages_ValueEveryone : presentationData.strings.Settings_Privacy_Messages_ValueContactsAndPremium, sectionId: self.section, style: .blocks, action: {
|
||||||
return ItemListDisclosureItem(presentationData: presentationData, title: "Messages", label: !value ? "Everybody" : "Contacts and Premium", sectionId: self.section, style: .blocks, action: {
|
|
||||||
arguments.openMessagePrivacy()
|
arguments.openMessagePrivacy()
|
||||||
})
|
})
|
||||||
case let .bioPrivacy(_, text, value):
|
case let .bioPrivacy(_, text, value):
|
||||||
|
@ -847,13 +847,12 @@ private func selectivePrivacySettingsControllerEntries(presentationData: Present
|
|||||||
}
|
}
|
||||||
|
|
||||||
if case .presence = kind, let peer {
|
if case .presence = kind, let peer {
|
||||||
//TODO:localize
|
entries.append(.hideReadTime(presentationData.theme, presentationData.strings.Settings_Privacy_ReadTime, state.hideReadTimeEnabled == true))
|
||||||
entries.append(.hideReadTime(presentationData.theme, "Hide Read Time", state.hideReadTimeEnabled == true))
|
entries.append(.hideReadTimeInfo(presentationData.theme, presentationData.strings.Settings_Privacy_ReadTimeFooter))
|
||||||
entries.append(.hideReadTimeInfo(presentationData.theme, "Do not show the time when you read a message to people you hid your last seen from. If you turn this on, their read time will also be hidden from you.\nThis does not affect group chats."))
|
|
||||||
|
|
||||||
if !peer.isPremium {
|
if !peer.isPremium {
|
||||||
entries.append(.subscribeToPremium(presentationData.theme, "Subscribe to Telegram Premium"))
|
entries.append(.subscribeToPremium(presentationData.theme, presentationData.strings.Settings_Privacy_ReadTimePremium))
|
||||||
entries.append(.subscribeToPremiumInfo(presentationData.theme, "It you subscribe to Telegram Premium, you will still see other users' last seen and read time even if you hid yours from them (unless they specifically restricted it)."))
|
entries.append(.subscribeToPremiumInfo(presentationData.theme, presentationData.strings.Settings_Privacy_ReadTimePremiumFooter))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1217,8 +1217,7 @@ public final class ShareController: ViewController {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
//TODO:localize
|
self.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Text(peer.compactDisplayTitle).string, customUndoText: (self.environment is ShareControllerAppEnvironment) ? presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Action : nil, timeout: nil, linkAction: { _ in
|
||||||
self.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: "**\(peer.compactDisplayTitle)** only accepts messages from contacts and **Premium** users.", customUndoText: (self.environment is ShareControllerAppEnvironment) ? "View" : nil, timeout: nil, linkAction: { _ in
|
|
||||||
}), elevatedLayout: false, animateInAsReplacement: false, action: { [weak self] action in
|
}), elevatedLayout: false, animateInAsReplacement: false, action: { [weak self] action in
|
||||||
guard let self, let parentNavigationController = self.parentNavigationController, let context = self.currentContext as? ShareControllerAppAccountContext else {
|
guard let self, let parentNavigationController = self.parentNavigationController, let context = self.currentContext as? ShareControllerAppAccountContext else {
|
||||||
return false
|
return false
|
||||||
|
@ -6,7 +6,6 @@ public enum Api {
|
|||||||
public enum channels {}
|
public enum channels {}
|
||||||
public enum chatlists {}
|
public enum chatlists {}
|
||||||
public enum contacts {}
|
public enum contacts {}
|
||||||
public enum feed {}
|
|
||||||
public enum help {}
|
public enum help {}
|
||||||
public enum messages {}
|
public enum messages {}
|
||||||
public enum payments {}
|
public enum payments {}
|
||||||
@ -27,7 +26,6 @@ public enum Api {
|
|||||||
public enum channels {}
|
public enum channels {}
|
||||||
public enum chatlists {}
|
public enum chatlists {}
|
||||||
public enum contacts {}
|
public enum contacts {}
|
||||||
public enum feed {}
|
|
||||||
public enum folders {}
|
public enum folders {}
|
||||||
public enum help {}
|
public enum help {}
|
||||||
public enum langpack {}
|
public enum langpack {}
|
||||||
@ -254,7 +252,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[1103040667] = { return Api.ExportedContactToken.parse_exportedContactToken($0) }
|
dict[1103040667] = { return Api.ExportedContactToken.parse_exportedContactToken($0) }
|
||||||
dict[1571494644] = { return Api.ExportedMessageLink.parse_exportedMessageLink($0) }
|
dict[1571494644] = { return Api.ExportedMessageLink.parse_exportedMessageLink($0) }
|
||||||
dict[1070138683] = { return Api.ExportedStoryLink.parse_exportedStoryLink($0) }
|
dict[1070138683] = { return Api.ExportedStoryLink.parse_exportedStoryLink($0) }
|
||||||
dict[1348066419] = { return Api.FeedPosition.parse_feedPosition($0) }
|
|
||||||
dict[-207944868] = { return Api.FileHash.parse_fileHash($0) }
|
dict[-207944868] = { return Api.FileHash.parse_fileHash($0) }
|
||||||
dict[-11252123] = { return Api.Folder.parse_folder($0) }
|
dict[-11252123] = { return Api.Folder.parse_folder($0) }
|
||||||
dict[-373643672] = { return Api.FolderPeer.parse_folderPeer($0) }
|
dict[-373643672] = { return Api.FolderPeer.parse_folderPeer($0) }
|
||||||
@ -597,7 +594,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[577659656] = { return Api.NotifyPeer.parse_notifyForumTopic($0) }
|
dict[577659656] = { return Api.NotifyPeer.parse_notifyForumTopic($0) }
|
||||||
dict[-1613493288] = { return Api.NotifyPeer.parse_notifyPeer($0) }
|
dict[-1613493288] = { return Api.NotifyPeer.parse_notifyPeer($0) }
|
||||||
dict[-1261946036] = { return Api.NotifyPeer.parse_notifyUsers($0) }
|
dict[-1261946036] = { return Api.NotifyPeer.parse_notifyUsers($0) }
|
||||||
dict[1001931436] = { return Api.OutboxReadDate.parse_outboxReadDate($0) }
|
|
||||||
dict[-1738178803] = { return Api.Page.parse_page($0) }
|
dict[-1738178803] = { return Api.Page.parse_page($0) }
|
||||||
dict[-837994576] = { return Api.PageBlock.parse_pageBlockAnchor($0) }
|
dict[-837994576] = { return Api.PageBlock.parse_pageBlockAnchor($0) }
|
||||||
dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) }
|
dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) }
|
||||||
@ -954,7 +950,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[-1218471511] = { return Api.Update.parse_updateReadChannelOutbox($0) }
|
dict[-1218471511] = { return Api.Update.parse_updateReadChannelOutbox($0) }
|
||||||
dict[-78886548] = { return Api.Update.parse_updateReadFeaturedEmojiStickers($0) }
|
dict[-78886548] = { return Api.Update.parse_updateReadFeaturedEmojiStickers($0) }
|
||||||
dict[1461528386] = { return Api.Update.parse_updateReadFeaturedStickers($0) }
|
dict[1461528386] = { return Api.Update.parse_updateReadFeaturedStickers($0) }
|
||||||
dict[1951948721] = { return Api.Update.parse_updateReadFeed($0) }
|
|
||||||
dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) }
|
dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) }
|
||||||
dict[791617983] = { return Api.Update.parse_updateReadHistoryOutbox($0) }
|
dict[791617983] = { return Api.Update.parse_updateReadHistoryOutbox($0) }
|
||||||
dict[-131960447] = { return Api.Update.parse_updateReadMessagesContents($0) }
|
dict[-131960447] = { return Api.Update.parse_updateReadMessagesContents($0) }
|
||||||
@ -999,11 +994,11 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[-2100168954] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) }
|
dict[-2100168954] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) }
|
||||||
dict[1326562017] = { return Api.UserProfilePhoto.parse_userProfilePhotoEmpty($0) }
|
dict[1326562017] = { return Api.UserProfilePhoto.parse_userProfilePhotoEmpty($0) }
|
||||||
dict[164646985] = { return Api.UserStatus.parse_userStatusEmpty($0) }
|
dict[164646985] = { return Api.UserStatus.parse_userStatusEmpty($0) }
|
||||||
dict[1703516023] = { return Api.UserStatus.parse_userStatusLastMonth($0) }
|
dict[2011940674] = { return Api.UserStatus.parse_userStatusLastMonth($0) }
|
||||||
dict[1410997530] = { return Api.UserStatus.parse_userStatusLastWeek($0) }
|
dict[129960444] = { return Api.UserStatus.parse_userStatusLastWeek($0) }
|
||||||
dict[9203775] = { return Api.UserStatus.parse_userStatusOffline($0) }
|
dict[9203775] = { return Api.UserStatus.parse_userStatusOffline($0) }
|
||||||
dict[-306628279] = { return Api.UserStatus.parse_userStatusOnline($0) }
|
dict[-306628279] = { return Api.UserStatus.parse_userStatusOnline($0) }
|
||||||
dict[2065268168] = { return Api.UserStatus.parse_userStatusRecently($0) }
|
dict[-496024847] = { return Api.UserStatus.parse_userStatusRecently($0) }
|
||||||
dict[-1274595769] = { return Api.Username.parse_username($0) }
|
dict[-1274595769] = { return Api.Username.parse_username($0) }
|
||||||
dict[-567037804] = { return Api.VideoSize.parse_videoSize($0) }
|
dict[-567037804] = { return Api.VideoSize.parse_videoSize($0) }
|
||||||
dict[-128171716] = { return Api.VideoSize.parse_videoSizeEmojiMarkup($0) }
|
dict[-128171716] = { return Api.VideoSize.parse_videoSizeEmojiMarkup($0) }
|
||||||
@ -1095,8 +1090,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[1891070632] = { return Api.contacts.TopPeers.parse_topPeers($0) }
|
dict[1891070632] = { return Api.contacts.TopPeers.parse_topPeers($0) }
|
||||||
dict[-1255369827] = { return Api.contacts.TopPeers.parse_topPeersDisabled($0) }
|
dict[-1255369827] = { return Api.contacts.TopPeers.parse_topPeersDisabled($0) }
|
||||||
dict[-567906571] = { return Api.contacts.TopPeers.parse_topPeersNotModified($0) }
|
dict[-567906571] = { return Api.contacts.TopPeers.parse_topPeersNotModified($0) }
|
||||||
dict[-587770695] = { return Api.feed.FeedMessages.parse_feedMessages($0) }
|
|
||||||
dict[-619039485] = { return Api.feed.FeedMessages.parse_feedMessagesNotModified($0) }
|
|
||||||
dict[-585598930] = { return Api.help.AppConfig.parse_appConfig($0) }
|
dict[-585598930] = { return Api.help.AppConfig.parse_appConfig($0) }
|
||||||
dict[2094949405] = { return Api.help.AppConfig.parse_appConfigNotModified($0) }
|
dict[2094949405] = { return Api.help.AppConfig.parse_appConfigNotModified($0) }
|
||||||
dict[-860107216] = { return Api.help.AppUpdate.parse_appUpdate($0) }
|
dict[-860107216] = { return Api.help.AppUpdate.parse_appUpdate($0) }
|
||||||
@ -1474,8 +1467,6 @@ public extension Api {
|
|||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.ExportedStoryLink:
|
case let _1 as Api.ExportedStoryLink:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.FeedPosition:
|
|
||||||
_1.serialize(buffer, boxed)
|
|
||||||
case let _1 as Api.FileHash:
|
case let _1 as Api.FileHash:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.Folder:
|
case let _1 as Api.Folder:
|
||||||
@ -1662,8 +1653,6 @@ public extension Api {
|
|||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.NotifyPeer:
|
case let _1 as Api.NotifyPeer:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.OutboxReadDate:
|
|
||||||
_1.serialize(buffer, boxed)
|
|
||||||
case let _1 as Api.Page:
|
case let _1 as Api.Page:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.PageBlock:
|
case let _1 as Api.PageBlock:
|
||||||
@ -1976,8 +1965,6 @@ public extension Api {
|
|||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.contacts.TopPeers:
|
case let _1 as Api.contacts.TopPeers:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.feed.FeedMessages:
|
|
||||||
_1.serialize(buffer, boxed)
|
|
||||||
case let _1 as Api.help.AppConfig:
|
case let _1 as Api.help.AppConfig:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.help.AppUpdate:
|
case let _1 as Api.help.AppUpdate:
|
||||||
|
@ -98,42 +98,6 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api {
|
|
||||||
enum OutboxReadDate: TypeConstructorDescription {
|
|
||||||
case outboxReadDate(date: Int32)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .outboxReadDate(let date):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1001931436)
|
|
||||||
}
|
|
||||||
serializeInt32(date, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .outboxReadDate(let date):
|
|
||||||
return ("outboxReadDate", [("date", date as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_outboxReadDate(_ reader: BufferReader) -> OutboxReadDate? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.OutboxReadDate.outboxReadDate(date: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum Page: TypeConstructorDescription {
|
enum Page: TypeConstructorDescription {
|
||||||
case page(flags: Int32, url: String, blocks: [Api.PageBlock], photos: [Api.Photo], documents: [Api.Document], views: Int32?)
|
case page(flags: Int32, url: String, blocks: [Api.PageBlock], photos: [Api.Photo], documents: [Api.Document], views: Int32?)
|
||||||
|
@ -559,7 +559,6 @@ public extension Api {
|
|||||||
case updateReadChannelOutbox(channelId: Int64, maxId: Int32)
|
case updateReadChannelOutbox(channelId: Int64, maxId: Int32)
|
||||||
case updateReadFeaturedEmojiStickers
|
case updateReadFeaturedEmojiStickers
|
||||||
case updateReadFeaturedStickers
|
case updateReadFeaturedStickers
|
||||||
case updateReadFeed(flags: Int32, filterId: Int32, maxPosition: Api.FeedPosition, unreadCount: Int32?, unreadMutedCount: Int32?)
|
|
||||||
case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32)
|
case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32)
|
||||||
case updateReadHistoryOutbox(peer: Api.Peer, maxId: Int32, pts: Int32, ptsCount: Int32)
|
case updateReadHistoryOutbox(peer: Api.Peer, maxId: Int32, pts: Int32, ptsCount: Int32)
|
||||||
case updateReadMessagesContents(flags: Int32, messages: [Int32], pts: Int32, ptsCount: Int32, date: Int32?)
|
case updateReadMessagesContents(flags: Int32, messages: [Int32], pts: Int32, ptsCount: Int32, date: Int32?)
|
||||||
@ -1452,16 +1451,6 @@ public extension Api {
|
|||||||
buffer.appendInt32(1461528386)
|
buffer.appendInt32(1461528386)
|
||||||
}
|
}
|
||||||
|
|
||||||
break
|
|
||||||
case .updateReadFeed(let flags, let filterId, let maxPosition, let unreadCount, let unreadMutedCount):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1951948721)
|
|
||||||
}
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
serializeInt32(filterId, buffer: buffer, boxed: false)
|
|
||||||
maxPosition.serialize(buffer, true)
|
|
||||||
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(unreadCount!, buffer: buffer, boxed: false)}
|
|
||||||
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(unreadMutedCount!, buffer: buffer, boxed: false)}
|
|
||||||
break
|
break
|
||||||
case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount):
|
case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount):
|
||||||
if boxed {
|
if boxed {
|
||||||
@ -1884,8 +1873,6 @@ public extension Api {
|
|||||||
return ("updateReadFeaturedEmojiStickers", [])
|
return ("updateReadFeaturedEmojiStickers", [])
|
||||||
case .updateReadFeaturedStickers:
|
case .updateReadFeaturedStickers:
|
||||||
return ("updateReadFeaturedStickers", [])
|
return ("updateReadFeaturedStickers", [])
|
||||||
case .updateReadFeed(let flags, let filterId, let maxPosition, let unreadCount, let unreadMutedCount):
|
|
||||||
return ("updateReadFeed", [("flags", flags as Any), ("filterId", filterId as Any), ("maxPosition", maxPosition as Any), ("unreadCount", unreadCount as Any), ("unreadMutedCount", unreadMutedCount as Any)])
|
|
||||||
case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount):
|
case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount):
|
||||||
return ("updateReadHistoryInbox", [("flags", flags as Any), ("folderId", folderId as Any), ("peer", peer as Any), ("maxId", maxId as Any), ("stillUnreadCount", stillUnreadCount as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)])
|
return ("updateReadHistoryInbox", [("flags", flags as Any), ("folderId", folderId as Any), ("peer", peer as Any), ("maxId", maxId as Any), ("stillUnreadCount", stillUnreadCount as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)])
|
||||||
case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount):
|
case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount):
|
||||||
@ -3710,31 +3697,6 @@ public extension Api {
|
|||||||
public static func parse_updateReadFeaturedStickers(_ reader: BufferReader) -> Update? {
|
public static func parse_updateReadFeaturedStickers(_ reader: BufferReader) -> Update? {
|
||||||
return Api.Update.updateReadFeaturedStickers
|
return Api.Update.updateReadFeaturedStickers
|
||||||
}
|
}
|
||||||
public static func parse_updateReadFeed(_ reader: BufferReader) -> Update? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
var _2: Int32?
|
|
||||||
_2 = reader.readInt32()
|
|
||||||
var _3: Api.FeedPosition?
|
|
||||||
if let signature = reader.readInt32() {
|
|
||||||
_3 = Api.parse(reader, signature: signature) as? Api.FeedPosition
|
|
||||||
}
|
|
||||||
var _4: Int32?
|
|
||||||
if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() }
|
|
||||||
var _5: Int32?
|
|
||||||
if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() }
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
let _c3 = _3 != nil
|
|
||||||
let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil
|
|
||||||
let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil
|
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 {
|
|
||||||
return Api.Update.updateReadFeed(flags: _1!, filterId: _2!, maxPosition: _3!, unreadCount: _4, unreadMutedCount: _5)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? {
|
public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? {
|
||||||
var _1: Int32?
|
var _1: Int32?
|
||||||
_1 = reader.readInt32()
|
_1 = reader.readInt32()
|
||||||
|
@ -801,11 +801,11 @@ public extension Api {
|
|||||||
public extension Api {
|
public extension Api {
|
||||||
enum UserStatus: TypeConstructorDescription {
|
enum UserStatus: TypeConstructorDescription {
|
||||||
case userStatusEmpty
|
case userStatusEmpty
|
||||||
case userStatusLastMonth(flags: Int32)
|
case userStatusLastMonth
|
||||||
case userStatusLastWeek(flags: Int32)
|
case userStatusLastWeek
|
||||||
case userStatusOffline(wasOnline: Int32)
|
case userStatusOffline(wasOnline: Int32)
|
||||||
case userStatusOnline(expires: Int32)
|
case userStatusOnline(expires: Int32)
|
||||||
case userStatusRecently(flags: Int32)
|
case userStatusRecently
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
switch self {
|
switch self {
|
||||||
@ -815,17 +815,17 @@ public extension Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
case .userStatusLastMonth(let flags):
|
case .userStatusLastMonth:
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(1703516023)
|
buffer.appendInt32(2011940674)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
break
|
break
|
||||||
case .userStatusLastWeek(let flags):
|
case .userStatusLastWeek:
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(1410997530)
|
buffer.appendInt32(129960444)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
break
|
break
|
||||||
case .userStatusOffline(let wasOnline):
|
case .userStatusOffline(let wasOnline):
|
||||||
if boxed {
|
if boxed {
|
||||||
@ -839,11 +839,11 @@ public extension Api {
|
|||||||
}
|
}
|
||||||
serializeInt32(expires, buffer: buffer, boxed: false)
|
serializeInt32(expires, buffer: buffer, boxed: false)
|
||||||
break
|
break
|
||||||
case .userStatusRecently(let flags):
|
case .userStatusRecently:
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(2065268168)
|
buffer.appendInt32(-496024847)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -852,16 +852,16 @@ public extension Api {
|
|||||||
switch self {
|
switch self {
|
||||||
case .userStatusEmpty:
|
case .userStatusEmpty:
|
||||||
return ("userStatusEmpty", [])
|
return ("userStatusEmpty", [])
|
||||||
case .userStatusLastMonth(let flags):
|
case .userStatusLastMonth:
|
||||||
return ("userStatusLastMonth", [("flags", flags as Any)])
|
return ("userStatusLastMonth", [])
|
||||||
case .userStatusLastWeek(let flags):
|
case .userStatusLastWeek:
|
||||||
return ("userStatusLastWeek", [("flags", flags as Any)])
|
return ("userStatusLastWeek", [])
|
||||||
case .userStatusOffline(let wasOnline):
|
case .userStatusOffline(let wasOnline):
|
||||||
return ("userStatusOffline", [("wasOnline", wasOnline as Any)])
|
return ("userStatusOffline", [("wasOnline", wasOnline as Any)])
|
||||||
case .userStatusOnline(let expires):
|
case .userStatusOnline(let expires):
|
||||||
return ("userStatusOnline", [("expires", expires as Any)])
|
return ("userStatusOnline", [("expires", expires as Any)])
|
||||||
case .userStatusRecently(let flags):
|
case .userStatusRecently:
|
||||||
return ("userStatusRecently", [("flags", flags as Any)])
|
return ("userStatusRecently", [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -869,26 +869,10 @@ public extension Api {
|
|||||||
return Api.UserStatus.userStatusEmpty
|
return Api.UserStatus.userStatusEmpty
|
||||||
}
|
}
|
||||||
public static func parse_userStatusLastMonth(_ reader: BufferReader) -> UserStatus? {
|
public static func parse_userStatusLastMonth(_ reader: BufferReader) -> UserStatus? {
|
||||||
var _1: Int32?
|
return Api.UserStatus.userStatusLastMonth
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.UserStatus.userStatusLastMonth(flags: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public static func parse_userStatusLastWeek(_ reader: BufferReader) -> UserStatus? {
|
public static func parse_userStatusLastWeek(_ reader: BufferReader) -> UserStatus? {
|
||||||
var _1: Int32?
|
return Api.UserStatus.userStatusLastWeek
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.UserStatus.userStatusLastWeek(flags: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public static func parse_userStatusOffline(_ reader: BufferReader) -> UserStatus? {
|
public static func parse_userStatusOffline(_ reader: BufferReader) -> UserStatus? {
|
||||||
var _1: Int32?
|
var _1: Int32?
|
||||||
@ -913,15 +897,7 @@ public extension Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static func parse_userStatusRecently(_ reader: BufferReader) -> UserStatus? {
|
public static func parse_userStatusRecently(_ reader: BufferReader) -> UserStatus? {
|
||||||
var _1: Int32?
|
return Api.UserStatus.userStatusRecently
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.UserStatus.userStatusRecently(flags: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -634,102 +634,6 @@ public extension Api.contacts {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api.feed {
|
|
||||||
enum FeedMessages: TypeConstructorDescription {
|
|
||||||
case feedMessages(flags: Int32, maxPosition: Api.FeedPosition?, minPosition: Api.FeedPosition?, readMaxPosition: Api.FeedPosition?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User])
|
|
||||||
case feedMessagesNotModified
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .feedMessages(let flags, let maxPosition, let minPosition, let readMaxPosition, let messages, let chats, let users):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-587770695)
|
|
||||||
}
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
if Int(flags) & Int(1 << 0) != 0 {maxPosition!.serialize(buffer, true)}
|
|
||||||
if Int(flags) & Int(1 << 1) != 0 {minPosition!.serialize(buffer, true)}
|
|
||||||
if Int(flags) & Int(1 << 2) != 0 {readMaxPosition!.serialize(buffer, true)}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(messages.count))
|
|
||||||
for item in messages {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(chats.count))
|
|
||||||
for item in chats {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(users.count))
|
|
||||||
for item in users {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case .feedMessagesNotModified:
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-619039485)
|
|
||||||
}
|
|
||||||
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .feedMessages(let flags, let maxPosition, let minPosition, let readMaxPosition, let messages, let chats, let users):
|
|
||||||
return ("feedMessages", [("flags", flags as Any), ("maxPosition", maxPosition as Any), ("minPosition", minPosition as Any), ("readMaxPosition", readMaxPosition as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)])
|
|
||||||
case .feedMessagesNotModified:
|
|
||||||
return ("feedMessagesNotModified", [])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_feedMessages(_ reader: BufferReader) -> FeedMessages? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
var _2: Api.FeedPosition?
|
|
||||||
if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() {
|
|
||||||
_2 = Api.parse(reader, signature: signature) as? Api.FeedPosition
|
|
||||||
} }
|
|
||||||
var _3: Api.FeedPosition?
|
|
||||||
if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() {
|
|
||||||
_3 = Api.parse(reader, signature: signature) as? Api.FeedPosition
|
|
||||||
} }
|
|
||||||
var _4: Api.FeedPosition?
|
|
||||||
if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() {
|
|
||||||
_4 = Api.parse(reader, signature: signature) as? Api.FeedPosition
|
|
||||||
} }
|
|
||||||
var _5: [Api.Message]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
|
|
||||||
}
|
|
||||||
var _6: [Api.Chat]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
|
|
||||||
}
|
|
||||||
var _7: [Api.User]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
|
||||||
}
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil
|
|
||||||
let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil
|
|
||||||
let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil
|
|
||||||
let _c5 = _5 != nil
|
|
||||||
let _c6 = _6 != nil
|
|
||||||
let _c7 = _7 != nil
|
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
|
|
||||||
return Api.feed.FeedMessages.feedMessages(flags: _1!, maxPosition: _2, minPosition: _3, readMaxPosition: _4, messages: _5!, chats: _6!, users: _7!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_feedMessagesNotModified(_ reader: BufferReader) -> FeedMessages? {
|
|
||||||
return Api.feed.FeedMessages.feedMessagesNotModified
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.help {
|
public extension Api.help {
|
||||||
enum AppConfig: TypeConstructorDescription {
|
enum AppConfig: TypeConstructorDescription {
|
||||||
case appConfig(hash: Int32, config: Api.JSONValue)
|
case appConfig(hash: Int32, config: Api.JSONValue)
|
||||||
@ -1400,3 +1304,89 @@ public extension Api.help {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.help {
|
||||||
|
enum PremiumPromo: TypeConstructorDescription {
|
||||||
|
case premiumPromo(statusText: String, statusEntities: [Api.MessageEntity], videoSections: [String], videos: [Api.Document], periodOptions: [Api.PremiumSubscriptionOption], users: [Api.User])
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1395946908)
|
||||||
|
}
|
||||||
|
serializeString(statusText, buffer: buffer, boxed: false)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(statusEntities.count))
|
||||||
|
for item in statusEntities {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(videoSections.count))
|
||||||
|
for item in videoSections {
|
||||||
|
serializeString(item, buffer: buffer, boxed: false)
|
||||||
|
}
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(videos.count))
|
||||||
|
for item in videos {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(periodOptions.count))
|
||||||
|
for item in periodOptions {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(users.count))
|
||||||
|
for item in users {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
|
||||||
|
return ("premiumPromo", [("statusText", statusText as Any), ("statusEntities", statusEntities as Any), ("videoSections", videoSections as Any), ("videos", videos as Any), ("periodOptions", periodOptions as Any), ("users", users as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_premiumPromo(_ reader: BufferReader) -> PremiumPromo? {
|
||||||
|
var _1: String?
|
||||||
|
_1 = parseString(reader)
|
||||||
|
var _2: [Api.MessageEntity]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self)
|
||||||
|
}
|
||||||
|
var _3: [String]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
|
||||||
|
}
|
||||||
|
var _4: [Api.Document]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
|
||||||
|
}
|
||||||
|
var _5: [Api.PremiumSubscriptionOption]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PremiumSubscriptionOption.self)
|
||||||
|
}
|
||||||
|
var _6: [Api.User]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||||
|
}
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
let _c3 = _3 != nil
|
||||||
|
let _c4 = _4 != nil
|
||||||
|
let _c5 = _5 != nil
|
||||||
|
let _c6 = _6 != nil
|
||||||
|
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
|
||||||
|
return Api.help.PremiumPromo.premiumPromo(statusText: _1!, statusEntities: _2!, videoSections: _3!, videos: _4!, periodOptions: _5!, users: _6!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,89 +1,3 @@
|
|||||||
public extension Api.help {
|
|
||||||
enum PremiumPromo: TypeConstructorDescription {
|
|
||||||
case premiumPromo(statusText: String, statusEntities: [Api.MessageEntity], videoSections: [String], videos: [Api.Document], periodOptions: [Api.PremiumSubscriptionOption], users: [Api.User])
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1395946908)
|
|
||||||
}
|
|
||||||
serializeString(statusText, buffer: buffer, boxed: false)
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(statusEntities.count))
|
|
||||||
for item in statusEntities {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(videoSections.count))
|
|
||||||
for item in videoSections {
|
|
||||||
serializeString(item, buffer: buffer, boxed: false)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(videos.count))
|
|
||||||
for item in videos {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(periodOptions.count))
|
|
||||||
for item in periodOptions {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(users.count))
|
|
||||||
for item in users {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
|
|
||||||
return ("premiumPromo", [("statusText", statusText as Any), ("statusEntities", statusEntities as Any), ("videoSections", videoSections as Any), ("videos", videos as Any), ("periodOptions", periodOptions as Any), ("users", users as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_premiumPromo(_ reader: BufferReader) -> PremiumPromo? {
|
|
||||||
var _1: String?
|
|
||||||
_1 = parseString(reader)
|
|
||||||
var _2: [Api.MessageEntity]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self)
|
|
||||||
}
|
|
||||||
var _3: [String]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
|
|
||||||
}
|
|
||||||
var _4: [Api.Document]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
|
|
||||||
}
|
|
||||||
var _5: [Api.PremiumSubscriptionOption]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PremiumSubscriptionOption.self)
|
|
||||||
}
|
|
||||||
var _6: [Api.User]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
|
||||||
}
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
let _c3 = _3 != nil
|
|
||||||
let _c4 = _4 != nil
|
|
||||||
let _c5 = _5 != nil
|
|
||||||
let _c6 = _6 != nil
|
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
|
|
||||||
return Api.help.PremiumPromo.premiumPromo(statusText: _1!, statusEntities: _2!, videoSections: _3!, videos: _4!, periodOptions: _5!, users: _6!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.help {
|
public extension Api.help {
|
||||||
enum PromoData: TypeConstructorDescription {
|
enum PromoData: TypeConstructorDescription {
|
||||||
case promoData(flags: Int32, expires: Int32, peer: Api.Peer, chats: [Api.Chat], users: [Api.User], psaType: String?, psaMessage: String?)
|
case promoData(flags: Int32, expires: Int32, peer: Api.Peer, chats: [Api.Chat], users: [Api.User], psaType: String?, psaMessage: String?)
|
||||||
|
@ -3770,44 +3770,6 @@ public extension Api.functions.contacts {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api.functions.feed {
|
|
||||||
static func getFeed(flags: Int32, filterId: Int32, offsetPosition: Api.FeedPosition?, addOffset: Int32, limit: Int32, maxPosition: Api.FeedPosition?, minPosition: Api.FeedPosition?, hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.feed.FeedMessages>) {
|
|
||||||
let buffer = Buffer()
|
|
||||||
buffer.appendInt32(2121717715)
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
serializeInt32(filterId, buffer: buffer, boxed: false)
|
|
||||||
if Int(flags) & Int(1 << 0) != 0 {offsetPosition!.serialize(buffer, true)}
|
|
||||||
serializeInt32(addOffset, buffer: buffer, boxed: false)
|
|
||||||
serializeInt32(limit, buffer: buffer, boxed: false)
|
|
||||||
if Int(flags) & Int(1 << 1) != 0 {maxPosition!.serialize(buffer, true)}
|
|
||||||
if Int(flags) & Int(1 << 2) != 0 {minPosition!.serialize(buffer, true)}
|
|
||||||
serializeInt64(hash, buffer: buffer, boxed: false)
|
|
||||||
return (FunctionDescription(name: "feed.getFeed", parameters: [("flags", String(describing: flags)), ("filterId", String(describing: filterId)), ("offsetPosition", String(describing: offsetPosition)), ("addOffset", String(describing: addOffset)), ("limit", String(describing: limit)), ("maxPosition", String(describing: maxPosition)), ("minPosition", String(describing: minPosition)), ("hash", String(describing: hash))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.feed.FeedMessages? in
|
|
||||||
let reader = BufferReader(buffer)
|
|
||||||
var result: Api.feed.FeedMessages?
|
|
||||||
if let signature = reader.readInt32() {
|
|
||||||
result = Api.parse(reader, signature: signature) as? Api.feed.FeedMessages
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.functions.feed {
|
|
||||||
static func readFeed(filterId: Int32, maxPosition: Api.FeedPosition) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
|
|
||||||
let buffer = Buffer()
|
|
||||||
buffer.appendInt32(-1271479809)
|
|
||||||
serializeInt32(filterId, buffer: buffer, boxed: false)
|
|
||||||
maxPosition.serialize(buffer, true)
|
|
||||||
return (FunctionDescription(name: "feed.readFeed", parameters: [("filterId", String(describing: filterId)), ("maxPosition", String(describing: maxPosition))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in
|
|
||||||
let reader = BufferReader(buffer)
|
|
||||||
var result: Api.Updates?
|
|
||||||
if let signature = reader.readInt32() {
|
|
||||||
result = Api.parse(reader, signature: signature) as? Api.Updates
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.functions.folders {
|
public extension Api.functions.folders {
|
||||||
static func editPeerFolders(folderPeers: [Api.InputFolderPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
|
static func editPeerFolders(folderPeers: [Api.InputFolderPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
@ -5693,22 +5655,6 @@ public extension Api.functions.messages {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api.functions.messages {
|
|
||||||
static func getOutboxReadDate(peer: Api.InputPeer, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.OutboxReadDate>) {
|
|
||||||
let buffer = Buffer()
|
|
||||||
buffer.appendInt32(-1941176739)
|
|
||||||
peer.serialize(buffer, true)
|
|
||||||
serializeInt32(msgId, buffer: buffer, boxed: false)
|
|
||||||
return (FunctionDescription(name: "messages.getOutboxReadDate", parameters: [("peer", String(describing: peer)), ("msgId", String(describing: msgId))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.OutboxReadDate? in
|
|
||||||
let reader = BufferReader(buffer)
|
|
||||||
var result: Api.OutboxReadDate?
|
|
||||||
if let signature = reader.readInt32() {
|
|
||||||
result = Api.parse(reader, signature: signature) as? Api.OutboxReadDate
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.functions.messages {
|
public extension Api.functions.messages {
|
||||||
static func getPeerDialogs(peers: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.messages.PeerDialogs>) {
|
static func getPeerDialogs(peers: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.messages.PeerDialogs>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
@ -9751,25 +9697,6 @@ public extension Api.functions.users {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api.functions.users {
|
|
||||||
static func getIsPremiumRequiredToContact(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.Bool]>) {
|
|
||||||
let buffer = Buffer()
|
|
||||||
buffer.appendInt32(-1507677680)
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(id.count))
|
|
||||||
for item in id {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
return (FunctionDescription(name: "users.getIsPremiumRequiredToContact", parameters: [("id", String(describing: id))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.Bool]? in
|
|
||||||
let reader = BufferReader(buffer)
|
|
||||||
var result: [Api.Bool]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
result = Api.parseVector(reader, elementSignature: 0, elementType: Api.Bool.self)
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api.functions.users {
|
public extension Api.functions.users {
|
||||||
static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) {
|
static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
|
@ -74,52 +74,6 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api {
|
|
||||||
enum FeedPosition: TypeConstructorDescription {
|
|
||||||
case feedPosition(date: Int32, peer: Api.Peer, id: Int32)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .feedPosition(let date, let peer, let id):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1348066419)
|
|
||||||
}
|
|
||||||
serializeInt32(date, buffer: buffer, boxed: false)
|
|
||||||
peer.serialize(buffer, true)
|
|
||||||
serializeInt32(id, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .feedPosition(let date, let peer, let id):
|
|
||||||
return ("feedPosition", [("date", date as Any), ("peer", peer as Any), ("id", id as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_feedPosition(_ reader: BufferReader) -> FeedPosition? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
var _2: Api.Peer?
|
|
||||||
if let signature = reader.readInt32() {
|
|
||||||
_2 = Api.parse(reader, signature: signature) as? Api.Peer
|
|
||||||
}
|
|
||||||
var _3: Int32?
|
|
||||||
_3 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
let _c3 = _3 != nil
|
|
||||||
if _c1 && _c2 && _c3 {
|
|
||||||
return Api.FeedPosition.feedPosition(date: _1!, peer: _2!, id: _3!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum FileHash: TypeConstructorDescription {
|
enum FileHash: TypeConstructorDescription {
|
||||||
case fileHash(offset: Int64, limit: Int32, hash: Buffer)
|
case fileHash(offset: Int64, limit: Int32, hash: Buffer)
|
||||||
|
@ -12,14 +12,14 @@ extension TelegramUserPresence {
|
|||||||
self.init(status: .present(until: expires), lastActivity: 0)
|
self.init(status: .present(until: expires), lastActivity: 0)
|
||||||
case let .userStatusOffline(wasOnline):
|
case let .userStatusOffline(wasOnline):
|
||||||
self.init(status: .present(until: wasOnline), lastActivity: 0)
|
self.init(status: .present(until: wasOnline), lastActivity: 0)
|
||||||
case let .userStatusRecently(flags):
|
case .userStatusRecently:
|
||||||
let isHidden = (flags & (1 << 0)) != 0
|
let isHidden = false//(flags & (1 << 0)) != 0
|
||||||
self.init(status: .recently(isHidden: isHidden), lastActivity: 0)
|
self.init(status: .recently(isHidden: isHidden), lastActivity: 0)
|
||||||
case let .userStatusLastWeek(flags):
|
case .userStatusLastWeek:
|
||||||
let isHidden = (flags & (1 << 0)) != 0
|
let isHidden = false//(flags & (1 << 0)) != 0
|
||||||
self.init(status: .lastWeek(isHidden: isHidden), lastActivity: 0)
|
self.init(status: .lastWeek(isHidden: isHidden), lastActivity: 0)
|
||||||
case let .userStatusLastMonth(flags):
|
case .userStatusLastMonth:
|
||||||
let isHidden = (flags & (1 << 0)) != 0
|
let isHidden = false//(flags & (1 << 0)) != 0
|
||||||
self.init(status: .lastMonth(isHidden: isHidden), lastActivity: 0)
|
self.init(status: .lastMonth(isHidden: isHidden), lastActivity: 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1388,7 +1388,7 @@ public final class AccountViewTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func internalRefreshCanSendMessagesStatsForPeerIds(peerIds: [PeerId]) {
|
private func internalRefreshCanSendMessagesStatsForPeerIds(peerIds: [PeerId]) {
|
||||||
self.queue.async {
|
/*self.queue.async {
|
||||||
var addedPeerIds: [PeerId] = []
|
var addedPeerIds: [PeerId] = []
|
||||||
let timestamp = Int32(CFAbsoluteTimeGetCurrent())
|
let timestamp = Int32(CFAbsoluteTimeGetCurrent())
|
||||||
for peerId in peerIds {
|
for peerId in peerIds {
|
||||||
@ -1472,7 +1472,7 @@ public final class AccountViewTracker {
|
|||||||
self.updatedUnsupportedMediaDisposables.set(signal.start(), forKey: disposableId)
|
self.updatedUnsupportedMediaDisposables.set(signal.start(), forKey: disposableId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public func updateMarkAllMentionsSeen(peerId: PeerId, threadId: Int64?) {
|
public func updateMarkAllMentionsSeen(peerId: PeerId, threadId: Int64?) {
|
||||||
|
@ -3,7 +3,8 @@ import Postbox
|
|||||||
import TelegramApi
|
import TelegramApi
|
||||||
|
|
||||||
internal func _internal_updateIsPremiumRequiredToContact(account: Account, peerIds: [EnginePeer.Id]) -> Signal<[EnginePeer.Id], NoError> {
|
internal func _internal_updateIsPremiumRequiredToContact(account: Account, peerIds: [EnginePeer.Id]) -> Signal<[EnginePeer.Id], NoError> {
|
||||||
return account.postbox.transaction { transaction -> ([Api.InputUser], [PeerId]) in
|
return .single([])
|
||||||
|
/*return account.postbox.transaction { transaction -> ([Api.InputUser], [PeerId]) in
|
||||||
var inputUsers: [Api.InputUser] = []
|
var inputUsers: [Api.InputUser] = []
|
||||||
var premiumRequired:[EnginePeer.Id] = []
|
var premiumRequired:[EnginePeer.Id] = []
|
||||||
for id in peerIds {
|
for id in peerIds {
|
||||||
@ -52,5 +53,5 @@ internal func _internal_updateIsPremiumRequiredToContact(account: Account, peerI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ func _internal_messageReadStats(account: Account, id: MessageId) -> Signal<Messa
|
|||||||
}
|
}
|
||||||
|
|
||||||
if id.peerId.namespace == Namespaces.Peer.CloudUser {
|
if id.peerId.namespace == Namespaces.Peer.CloudUser {
|
||||||
return account.network.request(Api.functions.messages.getOutboxReadDate(peer: inputPeer, msgId: id.id))
|
return .single(nil)
|
||||||
|
/*return account.network.request(Api.functions.messages.getOutboxReadDate(peer: inputPeer, msgId: id.id))
|
||||||
|> map(Optional.init)
|
|> map(Optional.init)
|
||||||
|> `catch` { _ -> Signal<Api.OutboxReadDate?, NoError> in
|
|> `catch` { _ -> Signal<Api.OutboxReadDate?, NoError> in
|
||||||
return .single(nil)
|
return .single(nil)
|
||||||
@ -40,7 +41,7 @@ func _internal_messageReadStats(account: Account, id: MessageId) -> Signal<Messa
|
|||||||
case let .outboxReadDate(date):
|
case let .outboxReadDate(date):
|
||||||
return MessageReadStats(reactionCount: 0, peers: [EnginePeer(peer)], readTimestamps: [peer.id: date])
|
return MessageReadStats(reactionCount: 0, peers: [EnginePeer(peer)], readTimestamps: [peer.id: date])
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
} else {
|
} else {
|
||||||
let readPeers: Signal<[(Int64, Int32)]?, NoError> = account.network.request(Api.functions.messages.getMessageReadParticipants(peer: inputPeer, msgId: id.id))
|
let readPeers: Signal<[(Int64, Int32)]?, NoError> = account.network.request(Api.functions.messages.getMessageReadParticipants(peer: inputPeer, msgId: id.id))
|
||||||
|> map { result -> [(Int64, Int32)]? in
|
|> map { result -> [(Int64, Int32)]? in
|
||||||
|
@ -489,14 +489,16 @@ public extension Message {
|
|||||||
|
|
||||||
public extension Message {
|
public extension Message {
|
||||||
func areReactionsTags(accountPeerId: PeerId) -> Bool {
|
func areReactionsTags(accountPeerId: PeerId) -> Bool {
|
||||||
if self.id.peerId == accountPeerId {
|
return false
|
||||||
|
|
||||||
|
/*if self.id.peerId == accountPeerId {
|
||||||
if let reactionsAttribute = self.reactionsAttribute, !reactionsAttribute.reactions.isEmpty {
|
if let reactionsAttribute = self.reactionsAttribute, !reactionsAttribute.reactions.isEmpty {
|
||||||
return reactionsAttribute.isTags
|
return reactionsAttribute.isTags
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,8 +252,7 @@ public final class ChatTitleView: UIView, NavigationBarTitleView {
|
|||||||
segments = [.text(0, NSAttributedString(string: customTitle, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
segments = [.text(0, NSAttributedString(string: customTitle, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
||||||
} else if peerView.peerId == self.context.account.peerId {
|
} else if peerView.peerId == self.context.account.peerId {
|
||||||
if peerView.isSavedMessages {
|
if peerView.isSavedMessages {
|
||||||
//TODO:localize
|
segments = [.text(0, NSAttributedString(string: self.strings.Conversation_MyNotes, font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
||||||
segments = [.text(0, NSAttributedString(string: "My Notes", font: titleFont, textColor: titleTheme.rootController.navigationBar.primaryTextColor))]
|
|
||||||
} else {
|
} else {
|
||||||
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))]
|
||||||
}
|
}
|
||||||
|
@ -2739,8 +2739,7 @@ public final class StoryItemSetContainerComponent: Component {
|
|||||||
var isUnsupported = false
|
var isUnsupported = false
|
||||||
var disabledPlaceholder: MessageInputPanelComponent.DisabledPlaceholder?
|
var disabledPlaceholder: MessageInputPanelComponent.DisabledPlaceholder?
|
||||||
if component.slice.additionalPeerData.isPremiumRequiredForMessaging {
|
if component.slice.additionalPeerData.isPremiumRequiredForMessaging {
|
||||||
//TODO:localize
|
disabledPlaceholder = .premiumRequired(title: component.strings.Story_MessagingRestrictedPlaceholder(component.slice.peer.compactDisplayTitle).string, subtitle: component.strings.Story_MessagingRestrictedPlaceholderAction, action: { [weak self] in
|
||||||
disabledPlaceholder = .premiumRequired(title: "Only Premium users can message \(component.slice.peer.compactDisplayTitle).", subtitle: "Learn more...", action: { [weak self] in
|
|
||||||
self?.presentPremiumRequiredForMessaging()
|
self?.presentPremiumRequiredForMessaging()
|
||||||
})
|
})
|
||||||
} else if component.slice.peer.isService {
|
} else if component.slice.peer.isService {
|
||||||
|
@ -111,8 +111,7 @@ extension ChatControllerImpl {
|
|||||||
if canAddMessageReactions(message: topMessage), let allowedReactions = allowedReactions, !topReactions.isEmpty {
|
if canAddMessageReactions(message: topMessage), let allowedReactions = allowedReactions, !topReactions.isEmpty {
|
||||||
actions.reactionItems = topReactions.map(ReactionContextItem.reaction)
|
actions.reactionItems = topReactions.map(ReactionContextItem.reaction)
|
||||||
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
||||||
//TODO:localize
|
actions.reactionsTitle = presentationData.strings.Chat_ContextMenuTagsTitle
|
||||||
actions.reactionsTitle = "Tag the message with an emoji for quick access later"
|
|
||||||
actions.allPresetReactionsAreAvailable = true
|
actions.allPresetReactionsAreAvailable = true
|
||||||
}
|
}
|
||||||
actions.selectedReactionItems = selectedReactions.reactions
|
actions.selectedReactionItems = selectedReactions.reactions
|
||||||
|
@ -571,14 +571,13 @@ func moveReplyMessageToAnotherChat(selfController: ChatControllerImpl, replySubj
|
|||||||
case .generic:
|
case .generic:
|
||||||
controller.present(textAlertController(context: context, updatedPresentationData: selfController.updatedPresentationData, title: nil, text: presentationData.strings.Forward_ErrorDisabledForChat, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
controller.present(textAlertController(context: context, updatedPresentationData: selfController.updatedPresentationData, title: nil, text: presentationData.strings.Forward_ErrorDisabledForChat, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||||
case .premiumRequired:
|
case .premiumRequired:
|
||||||
//TODO:localize
|
|
||||||
controller.forEachController { c in
|
controller.forEachController { c in
|
||||||
if let c = c as? UndoOverlayController {
|
if let c = c as? UndoOverlayController {
|
||||||
c.dismiss()
|
c.dismiss()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
controller.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: "**\(peer.compactDisplayTitle)** only accepts messages from contacts and **Premium** users.", customUndoText: "View", timeout: nil, linkAction: { _ in
|
controller.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Text(peer.compactDisplayTitle).text, customUndoText: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Action, timeout: nil, linkAction: { _ in
|
||||||
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak selfController, weak controller] action in
|
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak selfController, weak controller] action in
|
||||||
guard let selfController, let controller else {
|
guard let selfController, let controller else {
|
||||||
return false
|
return false
|
||||||
|
@ -62,14 +62,13 @@ extension ChatControllerImpl {
|
|||||||
case .generic:
|
case .generic:
|
||||||
controller.present(textAlertController(context: context, updatedPresentationData: strongSelf.updatedPresentationData, title: nil, text: presentationData.strings.Forward_ErrorDisabledForChat, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
controller.present(textAlertController(context: context, updatedPresentationData: strongSelf.updatedPresentationData, title: nil, text: presentationData.strings.Forward_ErrorDisabledForChat, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||||
case .premiumRequired:
|
case .premiumRequired:
|
||||||
//TODO:localize
|
|
||||||
controller.forEachController { c in
|
controller.forEachController { c in
|
||||||
if let c = c as? UndoOverlayController {
|
if let c = c as? UndoOverlayController {
|
||||||
c.dismiss()
|
c.dismiss()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
controller.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: "**\(peer.compactDisplayTitle)** only accepts messages from contacts and **Premium** users.", customUndoText: "View", timeout: nil, linkAction: { _ in
|
controller.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Text(peer.compactDisplayTitle), customUndoText: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Action, timeout: nil, linkAction: { _ in
|
||||||
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak controller] action in
|
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak controller] action in
|
||||||
guard let self, let controller else {
|
guard let self, let controller else {
|
||||||
return false
|
return false
|
||||||
|
@ -19,8 +19,7 @@ extension ChatControllerImpl {
|
|||||||
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
||||||
var items: [ContextMenuItem] = []
|
var items: [ContextMenuItem] = []
|
||||||
|
|
||||||
//TODO:localize
|
items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Chat_ReactionContextMenu_FilterByTag, icon: { _ in
|
||||||
items.append(.action(ContextMenuActionItem(text: "Fiter by Tag", icon: { _ in
|
|
||||||
return nil
|
return nil
|
||||||
}, action: { [weak self] _, a in
|
}, action: { [weak self] _, a in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -35,7 +34,7 @@ extension ChatControllerImpl {
|
|||||||
|
|
||||||
a(.default)
|
a(.default)
|
||||||
})))
|
})))
|
||||||
items.append(.action(ContextMenuActionItem(text: "Remove Tag", textColor: .destructive, icon: { _ in
|
items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Chat_ReactionContextMenu_RemoveTag, textColor: .destructive, icon: { _ in
|
||||||
return nil
|
return nil
|
||||||
}, action: { [weak self] _, a in
|
}, action: { [weak self] _, a in
|
||||||
a(.dismissWithoutContent)
|
a(.dismissWithoutContent)
|
||||||
|
@ -978,8 +978,7 @@ final class ChatEmptyNodePremiumRequiredChatContent: ASDisplayNode, ChatEmptyNod
|
|||||||
peerTitle = " "
|
peerTitle = " "
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
let text = interfaceState.strings.Chat_EmptyStateMessagingRestrictedToPremium_Text(peerTitle).text
|
||||||
let text = "Subscribe to **Premium**\nto message **\(peerTitle)**."
|
|
||||||
let textSize = self.text.update(
|
let textSize = self.text.update(
|
||||||
transition: .immediate,
|
transition: .immediate,
|
||||||
component: AnyComponent(BalancedTextComponent(
|
component: AnyComponent(BalancedTextComponent(
|
||||||
@ -998,11 +997,10 @@ final class ChatEmptyNodePremiumRequiredChatContent: ASDisplayNode, ChatEmptyNod
|
|||||||
containerSize: CGSize(width: maxWidth - sideInset * 2.0, height: 500.0)
|
containerSize: CGSize(width: maxWidth - sideInset * 2.0, height: 500.0)
|
||||||
)
|
)
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let buttonTitleSize = self.buttonTitle.update(
|
let buttonTitleSize = self.buttonTitle.update(
|
||||||
transition: .immediate,
|
transition: .immediate,
|
||||||
component: AnyComponent(MultilineTextComponent(
|
component: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "Add Premium", font: Font.semibold(15.0), textColor: serviceColor.primaryText))
|
text: .plain(NSAttributedString(string: interfaceState.strings.Chat_EmptyStateMessagingRestrictedToPremium_Action, font: Font.semibold(15.0), textColor: serviceColor.primaryText))
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 200.0, height: 100.0)
|
containerSize: CGSize(width: 200.0, height: 100.0)
|
||||||
|
@ -2655,8 +2655,7 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus
|
|||||||
|
|
||||||
if currentStats.peers.isEmpty {
|
if currentStats.peers.isEmpty {
|
||||||
if self.item.message.id.peerId.namespace == Namespaces.Peer.CloudUser {
|
if self.item.message.id.peerId.namespace == Namespaces.Peer.CloudUser {
|
||||||
//TODO:localize
|
let text = NSAttributedString(string: self.presentationData.strings.Chat_ContextMenuReadDate_ReadAvailablePrefix, font: Font.regular(floor(self.presentationData.listsFontSize.baseDisplaySize * 0.8)), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
||||||
let text = NSAttributedString(string: "read", font: Font.regular(floor(self.presentationData.listsFontSize.baseDisplaySize * 0.8)), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
|
||||||
if self.textNode.attributedText != text {
|
if self.textNode.attributedText != text {
|
||||||
animatePositions = false
|
animatePositions = false
|
||||||
}
|
}
|
||||||
@ -2697,8 +2696,7 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus
|
|||||||
}
|
}
|
||||||
)).string
|
)).string
|
||||||
|
|
||||||
//TODO:localize
|
self.textNode.attributedText = NSAttributedString(string: self.presentationData.strings.Chat_ContextMenuReadDate_ReadFormat(dateText).string, font: Font.regular(floor(self.presentationData.listsFontSize.baseDisplaySize * 0.8)), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
||||||
self.textNode.attributedText = NSAttributedString(string: "\(self.presentationData.strings.Conversation_ChecksTooltip_Read.lowercased()) \(dateText)", font: Font.regular(floor(self.presentationData.listsFontSize.baseDisplaySize * 0.8)), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
|
||||||
} else {
|
} else {
|
||||||
if reactionCount != 0 {
|
if reactionCount != 0 {
|
||||||
let text: String
|
let text: String
|
||||||
@ -2753,8 +2751,7 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus
|
|||||||
self.addSubnode(badgeText)
|
self.addSubnode(badgeText)
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
badgeText.attributedText = NSAttributedString(string: self.presentationData.strings.Chat_ContextMenuReadDate_ReadAvailableBadge, font: Font.regular(self.presentationData.listsFontSize.baseDisplaySize * 11.0 / 17.0), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
||||||
badgeText.attributedText = NSAttributedString(string: "show when", font: Font.regular(self.presentationData.listsFontSize.baseDisplaySize * 11.0 / 17.0), textColor: self.presentationData.theme.contextMenu.primaryColor)
|
|
||||||
|
|
||||||
badgeTextSize = badgeText.updateLayout(CGSize(width: calculatedWidth - sideInset - rightTextInset - iconSize.width - 4.0 - textSize.width - 12.0, height: 100.0))
|
badgeTextSize = badgeText.updateLayout(CGSize(width: calculatedWidth - sideInset - rightTextInset - iconSize.width - 4.0 - textSize.width - 12.0, height: 100.0))
|
||||||
} else {
|
} else {
|
||||||
|
@ -12,7 +12,7 @@ func titlePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceStat
|
|||||||
if chatPresentationInterfaceState.renderedPeer?.peer?.restrictionText(platform: "ios", contentSettings: context.currentContentSettings.with { $0 }) != nil {
|
if chatPresentationInterfaceState.renderedPeer?.peer?.restrictionText(platform: "ios", contentSettings: context.currentContentSettings.with { $0 }) != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if let search = chatPresentationInterfaceState.search {
|
/*if let search = chatPresentationInterfaceState.search {
|
||||||
if chatPresentationInterfaceState.chatLocation.peerId == context.account.peerId, case .everything = search.domain {
|
if chatPresentationInterfaceState.chatLocation.peerId == context.account.peerId, case .everything = search.domain {
|
||||||
if let currentPanel = currentPanel as? ChatSearchTitleAccessoryPanelNode {
|
if let currentPanel = currentPanel as? ChatSearchTitleAccessoryPanelNode {
|
||||||
return currentPanel
|
return currentPanel
|
||||||
@ -24,7 +24,7 @@ func titlePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceStat
|
|||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
var inhibitTitlePanelDisplay = false
|
var inhibitTitlePanelDisplay = false
|
||||||
switch chatPresentationInterfaceState.subject {
|
switch chatPresentationInterfaceState.subject {
|
||||||
|
@ -98,9 +98,8 @@ final class ChatPremiumRequiredInputPanelNode: ChatInputPanelNode {
|
|||||||
peerTitle = " "
|
peerTitle = " "
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
let buttonTitle: String = params.interfaceState.strings.Chat_MessagingRestrictedPlaceholder(peerTitle).string
|
||||||
let buttonTitle: String = "Only Premium users can message \(peerTitle)."
|
let buttonSubtitle: String = params.interfaceState.strings.Chat_MessagingRestrictedAction
|
||||||
let buttonSubtitle: String = "Learn more..."
|
|
||||||
|
|
||||||
let size = CGSize(width: params.width - params.additionalSideInsets.left * 2.0 - params.leftInset * 2.0, height: height)
|
let size = CGSize(width: params.width - params.additionalSideInsets.left * 2.0 - params.leftInset * 2.0, height: height)
|
||||||
let buttonSize = self.button.update(
|
let buttonSize = self.button.update(
|
||||||
|
@ -36,8 +36,7 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
|
|||||||
switch chatLocation {
|
switch chatLocation {
|
||||||
case .peer, .replyThread, .feed:
|
case .peer, .replyThread, .feed:
|
||||||
if chatLocation.peerId == context.account.peerId {
|
if chatLocation.peerId == context.account.peerId {
|
||||||
//TODO:localize
|
placeholderText = strings.Chat_SearchTagsPlaceholder
|
||||||
placeholderText = "Search messages or tags"
|
|
||||||
} else {
|
} else {
|
||||||
placeholderText = strings.Conversation_SearchPlaceholder
|
placeholderText = strings.Conversation_SearchPlaceholder
|
||||||
}
|
}
|
||||||
@ -115,8 +114,7 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
|
|||||||
if presentationInterfaceState.historyFilter != nil {
|
if presentationInterfaceState.historyFilter != nil {
|
||||||
placeholderText = self.strings.Common_Search
|
placeholderText = self.strings.Common_Search
|
||||||
} else if self.chatLocation.peerId == self.context.account.peerId {
|
} else if self.chatLocation.peerId == self.context.account.peerId {
|
||||||
//TODO:localize
|
placeholderText = self.strings.Chat_SearchTagsPlaceholder
|
||||||
placeholderText = "Search messages or tags"
|
|
||||||
} else {
|
} else {
|
||||||
placeholderText = self.strings.Conversation_SearchPlaceholder
|
placeholderText = self.strings.Conversation_SearchPlaceholder
|
||||||
}
|
}
|
||||||
|
@ -91,12 +91,11 @@ final class ChatTagSearchInputPanelNode: ChatInputPanelNode {
|
|||||||
height = 45.0
|
height = 45.0
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let buttonTitle: String
|
let buttonTitle: String
|
||||||
if let historyFilter = params.interfaceState.historyFilter, historyFilter.isActive {
|
if let historyFilter = params.interfaceState.historyFilter, historyFilter.isActive {
|
||||||
buttonTitle = "Show Other Messages"
|
buttonTitle = params.interfaceState.strings.Chat_TagSearchShowMessages
|
||||||
} else {
|
} else {
|
||||||
buttonTitle = "Hide Other Messages"
|
buttonTitle = params.interfaceState.strings.Chat_TagSearchHideMessages
|
||||||
}
|
}
|
||||||
|
|
||||||
let size = CGSize(width: params.width - params.additionalSideInsets.left * 2.0 - params.leftInset * 2.0, height: height)
|
let size = CGSize(width: params.width - params.additionalSideInsets.left * 2.0 - params.leftInset * 2.0, height: height)
|
||||||
|
@ -378,14 +378,13 @@ class ContactMultiselectionControllerImpl: ViewController, ContactMultiselection
|
|||||||
case .generic:
|
case .generic:
|
||||||
break
|
break
|
||||||
case .premiumRequired:
|
case .premiumRequired:
|
||||||
//TODO:localize
|
|
||||||
self.forEachController { c in
|
self.forEachController { c in
|
||||||
if let c = c as? UndoOverlayController {
|
if let c = c as? UndoOverlayController {
|
||||||
c.dismiss()
|
c.dismiss()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
self.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: "**\(peer.compactDisplayTitle)** only accepts messages from contacts and **Premium** users.", customUndoText: "View", timeout: nil, linkAction: { _ in
|
self.present(UndoOverlayController(presentationData: presentationData, content: .premiumPaywall(title: nil, text: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Text(peer.compactDisplayTitle).string, customUndoText: presentationData.strings.Chat_ToastMessagingRestrictedToPremium_Action, timeout: nil, linkAction: { _ in
|
||||||
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] action in
|
}), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] action in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return false
|
return false
|
||||||
|
@ -2135,8 +2135,7 @@ public final class SharedAccountContextImpl: SharedAccountContext {
|
|||||||
|
|
||||||
switch subject {
|
switch subject {
|
||||||
case .presence:
|
case .presence:
|
||||||
//TODO:localize
|
tooltipText = presentationData.strings.Settings_Privacy_LastSeenRevealedToast
|
||||||
tooltipText = "Your last seen time is now visible."
|
|
||||||
|
|
||||||
let _ = (currentPrivacy.get()
|
let _ = (currentPrivacy.get()
|
||||||
|> take(1)
|
|> take(1)
|
||||||
@ -2163,7 +2162,7 @@ public final class SharedAccountContextImpl: SharedAccountContext {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
case .readTime:
|
case .readTime:
|
||||||
tooltipText = "Your read times are now visible."
|
tooltipText = presentationData.strings.Settings_Privacy_MessageReadTimeRevealedToast
|
||||||
|
|
||||||
let _ = (currentPrivacy.get()
|
let _ = (currentPrivacy.get()
|
||||||
|> take(1)
|
|> take(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user