mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Merge branch 'master' into gradient-messages
This commit is contained in:
commit
92d3e81028
716 changed files with 10786 additions and 3506 deletions
|
|
@ -1 +1 @@
|
|||
Fixed crashes
|
||||
General fixes and stability improvements
|
||||
|
|
|
|||
|
|
@ -12,13 +12,17 @@ struct MatchingDeviceContact {
|
|||
let phoneNumbers: [String]
|
||||
}
|
||||
|
||||
func matchingDeviceContacts(stableIds: [String]) -> Signal<[MatchingDeviceContact], NoError> {
|
||||
enum IntentContactsError {
|
||||
case generic
|
||||
}
|
||||
|
||||
func matchingDeviceContacts(stableIds: [String]) -> Signal<[MatchingDeviceContact], IntentContactsError> {
|
||||
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
|
||||
return .single([])
|
||||
return .fail(.generic)
|
||||
}
|
||||
let store = CNContactStore()
|
||||
guard let contacts = try? store.unifiedContacts(matching: CNContact.predicateForContacts(withIdentifiers: stableIds), keysToFetch: [CNContactFormatter.descriptorForRequiredKeys(for: .fullName), CNContactPhoneNumbersKey as CNKeyDescriptor]) else {
|
||||
return .single([])
|
||||
return .fail(.generic)
|
||||
}
|
||||
|
||||
return .single(contacts.map({ contact in
|
||||
|
|
@ -34,19 +38,58 @@ func matchingDeviceContacts(stableIds: [String]) -> Signal<[MatchingDeviceContac
|
|||
}))
|
||||
}
|
||||
|
||||
private func matchPhoneNumbers(_ lhs: String, _ rhs: String) -> Bool {
|
||||
if lhs.count < 10 && lhs.count == rhs.count {
|
||||
return lhs == rhs
|
||||
} else if lhs.count >= 10 && rhs.count >= 10 && lhs.suffix(10) == rhs.suffix(10) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func matchingCloudContacts(postbox: Postbox, contacts: [MatchingDeviceContact]) -> Signal<[(String, TelegramUser)], NoError> {
|
||||
return postbox.transaction { transaction -> [(String, TelegramUser)] in
|
||||
var result: [(String, TelegramUser)] = []
|
||||
outer: for peerId in transaction.getContactPeerIds() {
|
||||
if let peer = transaction.getPeer(peerId) as? TelegramUser, let phone = peer.phone {
|
||||
if let peer = transaction.getPeer(peerId) as? TelegramUser, let peerPhoneNumber = peer.phone {
|
||||
for contact in contacts {
|
||||
for phoneNumber in contact.phoneNumbers {
|
||||
if arePhoneNumbersEqual(phoneNumber, phone) {
|
||||
if matchPhoneNumbers(phoneNumber, peerPhoneNumber) {
|
||||
result.append((contact.stableId, peer))
|
||||
continue outer
|
||||
}
|
||||
}
|
||||
}
|
||||
// var parsedPhoneNumbers: [String: ParsedPhoneNumber] = [:]
|
||||
// let parsedPeerPhoneNumber: ParsedPhoneNumber?
|
||||
// if let number = parsedPhoneNumbers[peerPhoneNumber] {
|
||||
// parsedPeerPhoneNumber = number
|
||||
// } else if let number = ParsedPhoneNumber(string: peerPhoneNumber) {
|
||||
// parsedPeerPhoneNumber = number
|
||||
// parsedPhoneNumbers[peerPhoneNumber] = number
|
||||
// } else {
|
||||
// parsedPeerPhoneNumber = nil
|
||||
// }
|
||||
//
|
||||
// for contact in contacts {
|
||||
// for phoneNumber in contact.phoneNumbers {
|
||||
// let parsedPhoneNumber: ParsedPhoneNumber?
|
||||
// if let number = parsedPhoneNumbers[phoneNumber] {
|
||||
// parsedPhoneNumber = number
|
||||
// } else if let number = ParsedPhoneNumber(string: phoneNumber) {
|
||||
// parsedPhoneNumber = number
|
||||
// parsedPhoneNumbers[phoneNumber] = number
|
||||
// } else {
|
||||
// parsedPhoneNumber = nil
|
||||
// }
|
||||
//
|
||||
// if parsedPeerPhoneNumber == parsedPhoneNumber {
|
||||
// result.append((contact.stableId, peer))
|
||||
// continue outer
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import TelegramCore
|
|||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import BuildConfig
|
||||
import Contacts
|
||||
|
||||
private var accountCache: Account?
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ enum IntentHandlingError {
|
|||
}
|
||||
|
||||
class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling, INStartAudioCallIntentHandling, INSearchCallHistoryIntentHandling {
|
||||
private let accountPromise = Promise<Account>()
|
||||
private let accountPromise = Promise<Account?>()
|
||||
|
||||
private let resolvePersonsDisposable = MetaDisposable()
|
||||
private let actionDisposable = MetaDisposable()
|
||||
|
|
@ -86,7 +87,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
|
||||
let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown"
|
||||
|
||||
let account: Signal<Account, NoError>
|
||||
let account: Signal<Account?, NoError>
|
||||
if let accountCache = accountCache {
|
||||
account = .single(accountCache)
|
||||
} else {
|
||||
|
|
@ -97,7 +98,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
let encryptionParameters = ValueBoxEncryptionParameters(forceEncryptionIfNoSet: false, key: ValueBoxEncryptionParameters.Key(data: deviceSpecificEncryptionParameters.key)!, salt: ValueBoxEncryptionParameters.Salt(data: deviceSpecificEncryptionParameters.salt)!)
|
||||
|
||||
account = currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0, appData: .single(buildConfig.bundleData(withAppToken: nil))), supplementary: true, manager: accountManager, rootPath: rootPath, auxiliaryMethods: accountAuxiliaryMethods, encryptionParameters: encryptionParameters)
|
||||
|> mapToSignal { account -> Signal<Account, NoError> in
|
||||
|> mapToSignal { account -> Signal<Account?, NoError> in
|
||||
if let account = account {
|
||||
switch account {
|
||||
case .upgrading:
|
||||
|
|
@ -117,12 +118,9 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
return .complete()
|
||||
}
|
||||
} else {
|
||||
return .complete()
|
||||
return .single(nil)
|
||||
}
|
||||
}
|
||||
|> afterNext { account in
|
||||
account.resetStateManagement()
|
||||
}
|
||||
|> take(1)
|
||||
}
|
||||
self.accountPromise.set(account)
|
||||
|
|
@ -138,6 +136,11 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
}
|
||||
|
||||
private func resolve(persons: [INPerson]?, with completion: @escaping ([INPersonResolutionResult]) -> Void) {
|
||||
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
|
||||
completion([INPersonResolutionResult.notRequired()])
|
||||
return
|
||||
}
|
||||
|
||||
guard let initialPersons = persons, !initialPersons.isEmpty else {
|
||||
completion([INPersonResolutionResult.needsValue()])
|
||||
return
|
||||
|
|
@ -205,8 +208,14 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
|> take(1)
|
||||
|> mapToSignal { matchedContacts in
|
||||
return account
|
||||
|> mapToSignal { account in
|
||||
return matchingCloudContacts(postbox: account.postbox, contacts: matchedContacts)
|
||||
|> introduceError(IntentContactsError.self)
|
||||
|> mapToSignal { account -> Signal<[(String, TelegramUser)], IntentContactsError> in
|
||||
if let account = account {
|
||||
return matchingCloudContacts(postbox: account.postbox, contacts: matchedContacts)
|
||||
|> introduceError(IntentContactsError.self)
|
||||
} else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
}
|
||||
}
|
||||
self.resolvePersonsDisposable.set((signal
|
||||
|
|
@ -219,6 +228,8 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
return INPersonResolutionResult.success(with: person)
|
||||
})
|
||||
}
|
||||
}, error: { error in
|
||||
completion([INPersonResolutionResult.unsupported()])
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -230,14 +241,20 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
let account = self.accountPromise.get()
|
||||
|
||||
let signal = account
|
||||
|> mapToSignal { account -> Signal<INPerson?, NoError> in
|
||||
return matchingCloudContact(postbox: account.postbox, peerId: PeerId(peerId))
|
||||
|> map { user -> INPerson? in
|
||||
if let user = user {
|
||||
return personWithUser(stableId: "tg\(peerId)", user: user)
|
||||
} else {
|
||||
return nil
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|> mapToSignal { account -> Signal<INPerson?, IntentHandlingError> in
|
||||
if let account = account {
|
||||
return matchingCloudContact(postbox: account.postbox, peerId: PeerId(peerId))
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|> map { user -> INPerson? in
|
||||
if let user = user {
|
||||
return personWithUser(stableId: "tg\(peerId)", user: user)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,6 +265,8 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
} else {
|
||||
completion([INPersonResolutionResult.needsValue()])
|
||||
}
|
||||
}, error: { error in
|
||||
completion([INPersonResolutionResult.notRequired()])
|
||||
}))
|
||||
} else {
|
||||
self.resolve(persons: intent.recipients, with: completion)
|
||||
|
|
@ -258,6 +277,10 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
}
|
||||
|
||||
func resolveContent(for intent: INSendMessageIntent, with completion: @escaping (INStringResolutionResult) -> Void) {
|
||||
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
|
||||
completion(INStringResolutionResult.notRequired())
|
||||
return
|
||||
}
|
||||
if let text = intent.content, !text.isEmpty {
|
||||
completion(INStringResolutionResult.success(with: text))
|
||||
} else {
|
||||
|
|
@ -267,6 +290,11 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
|
||||
func confirm(intent: INSendMessageIntent, completion: @escaping (INSendMessageIntentResponse) -> Void) {
|
||||
let userActivity = NSUserActivity(activityType: NSStringFromClass(INSendMessageIntent.self))
|
||||
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
|
||||
let response = INSendMessageIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
|
||||
completion(response)
|
||||
return
|
||||
}
|
||||
let response = INSendMessageIntentResponse(code: .ready, userActivity: userActivity)
|
||||
completion(response)
|
||||
}
|
||||
|
|
@ -278,6 +306,9 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
return .generic
|
||||
}
|
||||
|> mapToSignal { account -> Signal<Void, IntentHandlingError> in
|
||||
guard let account = account else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
guard let recipient = intent.recipients?.first, let customIdentifier = recipient.customIdentifier, customIdentifier.hasPrefix("tg") else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
|
|
@ -305,7 +336,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
}
|
||||
|> deliverOnMainQueue).start(error: { _ in
|
||||
let userActivity = NSUserActivity(activityType: NSStringFromClass(INSendMessageIntent.self))
|
||||
let response = INSendMessageIntentResponse(code: .failure, userActivity: userActivity)
|
||||
let response = INSendMessageIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
|
||||
completion(response)
|
||||
}, completed: {
|
||||
let userActivity = NSUserActivity(activityType: NSStringFromClass(INSendMessageIntent.self))
|
||||
|
|
@ -325,18 +356,27 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
|> take(1)
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|> mapToSignal { account -> Signal<[INMessage], IntentHandlingError> in
|
||||
guard let account = account else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
|
||||
account.shouldBeServiceTaskMaster.set(.single(.now))
|
||||
account.resetStateManagement()
|
||||
|
||||
return account.stateManager.pollStateUpdateCompletion()
|
||||
let completion: Signal<Void, NoError> = account.stateManager.pollStateUpdateCompletion()
|
||||
|> map { _ in
|
||||
return Void()
|
||||
}
|
||||
|
||||
return (completion |> timeout(4.0, queue: Queue.mainQueue(), alternate: .single(Void())))
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|> take(1)
|
||||
|> mapToSignal { _ -> Signal<[INMessage], IntentHandlingError> in
|
||||
return unreadMessages(account: account)
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
}
|
||||
|> afterDisposed {
|
||||
account.shouldBeServiceTaskMaster.set(.single(.never))
|
||||
|> afterDisposed {
|
||||
account.shouldBeServiceTaskMaster.set(.single(.never))
|
||||
}
|
||||
}
|
||||
}
|
||||
|> deliverOnMainQueue).start(next: { messages in
|
||||
|
|
@ -346,7 +386,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
completion(response)
|
||||
}, error: { _ in
|
||||
let userActivity = NSUserActivity(activityType: NSStringFromClass(INSearchForMessagesIntent.self))
|
||||
let response = INSearchForMessagesIntentResponse(code: .failure, userActivity: userActivity)
|
||||
let response = INSearchForMessagesIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
|
||||
completion(response)
|
||||
}))
|
||||
}
|
||||
|
|
@ -373,8 +413,11 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
return .generic
|
||||
}
|
||||
|> mapToSignal { account -> Signal<Void, IntentHandlingError> in
|
||||
var signals: [Signal<Void, IntentHandlingError>] = []
|
||||
guard let account = account else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
|
||||
var signals: [Signal<Void, IntentHandlingError>] = []
|
||||
var maxMessageIdsToApply: [PeerId: MessageId] = [:]
|
||||
if let identifiers = intent.identifiers {
|
||||
for identifier in identifiers {
|
||||
|
|
@ -478,6 +521,10 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
|> take(1)
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|> mapToSignal { account -> Signal<[CallRecord], IntentHandlingError> in
|
||||
guard let account = account else {
|
||||
return .fail(.generic)
|
||||
}
|
||||
|
||||
account.shouldBeServiceTaskMaster.set(.single(.now))
|
||||
return missedCalls(account: account)
|
||||
|> introduceError(IntentHandlingError.self)
|
||||
|
|
@ -497,7 +544,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag
|
|||
completion(response)
|
||||
}, error: { _ in
|
||||
let userActivity = NSUserActivity(activityType: NSStringFromClass(INSearchCallHistoryIntent.self))
|
||||
let response = INSearchCallHistoryIntentResponse(code: .failure, userActivity: userActivity)
|
||||
let response = INSearchCallHistoryIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
|
||||
completion(response)
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ func unreadMessages(account: Account) -> Signal<[INMessage], NoError> {
|
|||
var signals: [Signal<[INMessage], NoError>] = []
|
||||
for entry in view.0.entries {
|
||||
if case let .MessageEntry(index, _, readState, notificationSettings, _, _, _, _) = entry {
|
||||
if index.messageIndex.id.peerId.namespace != Namespaces.Peer.CloudUser {
|
||||
continue
|
||||
}
|
||||
|
||||
var hasUnread = false
|
||||
var fixedCombinedReadStates: MessageHistoryViewReadState?
|
||||
if let readState = readState {
|
||||
|
|
@ -133,7 +137,7 @@ private func callWithTelegramMessage(_ telegramMessage: Message, account: Accoun
|
|||
}
|
||||
|
||||
private func messageWithTelegramMessage(_ telegramMessage: Message, account: Account) -> INMessage? {
|
||||
guard let author = telegramMessage.author, let user = telegramMessage.peers[author.id] as? TelegramUser else {
|
||||
guard let author = telegramMessage.author, let user = telegramMessage.peers[author.id] as? TelegramUser, user.id.id != 777000 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -194,9 +198,16 @@ private func messageWithTelegramMessage(_ telegramMessage: Message, account: Acc
|
|||
break loop
|
||||
}
|
||||
}
|
||||
|
||||
if telegramMessage.text.isEmpty && messageType == .text {
|
||||
return nil
|
||||
}
|
||||
|
||||
message = INMessage(identifier: identifier, conversationIdentifier: "\(telegramMessage.id.peerId.toInt64())", content: telegramMessage.text, dateSent: date, sender: sender, recipients: [], groupName: nil, messageType: messageType)
|
||||
} else {
|
||||
if telegramMessage.text.isEmpty {
|
||||
return nil
|
||||
}
|
||||
message = INMessage(identifier: identifier, content: telegramMessage.text, dateSent: date, sender: sender, recipients: [])
|
||||
}
|
||||
|
||||
|
|
|
|||
153
Telegram-iOS.xcworkspace/contents.xcworkspacedata
generated
153
Telegram-iOS.xcworkspace/contents.xcworkspacedata
generated
|
|
@ -1,66 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:submodules/RLottie/RLottie_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/LightweightAccountData/LightweightAccountData_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/WatchCommon/WatchCommon_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/BuildConfig/BuildConfig_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Utils">
|
||||
<FileRef
|
||||
location = "group:submodules/TextFormat/TextFormat_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/MergeLists/MergeLists_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Core">
|
||||
<FileRef
|
||||
location = "group:submodules/Postbox/Postbox_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/MtProtoKit/MtProtoKit_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramApi/TelegramApi_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramCore/TelegramCore_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "UI">
|
||||
<FileRef
|
||||
location = "group:submodules/AccountContext/AccountContext_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramUpdateUI/TelegramUpdateUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramPresentationData/TelegramPresentationData_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramUIPreferences/TelegramUIPreferences_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramCallsUI/TelegramCallsUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/RMIntro/RMIntro_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Voip">
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramVoip/TelegramVoip_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/libtgvoip/libtgvoip_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Shared">
|
||||
<FileRef
|
||||
location = "group:submodules/LightweightAccountData/LightweightAccountData_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/WatchCommon/WatchCommon_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/BuildConfig/BuildConfig_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "UI Components">
|
||||
<FileRef
|
||||
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/MediaResources/MediaResources_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/CheckNode/CheckNode_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/SwitchNode/SwitchNode_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/AnimationUI/AnimationUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/ActivityIndicator/ActivityIndicator_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/AsyncDisplayKit/AsyncDisplayKit_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/Display/Display_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/RLottie/RLottie_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/ItemListUI/ItemListUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<FileRef
|
||||
location = "group:submodules/MediaPlayer/UniversalMediaPlayer_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/DeviceAccess/DeviceAccess_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramPresentationData/TelegramPresentationData_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramAudio/TelegramAudio_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramVoip/TelegramVoip_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramUIPreferences/TelegramUIPreferences_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/GZip/GZip_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/RMIntro/RMIntro_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramCallsUI/TelegramCallsUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/AsyncDisplayKit/AsyncDisplayKit_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/Display/Display_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/Postbox/Postbox_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/MtProtoKit/MtProtoKit_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/SSignalKit/SSignalKit_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramApi/TelegramApi_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramCore/TelegramCore_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/LegacyComponents/LegacyComponents_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
|
|
@ -73,9 +133,6 @@
|
|||
<FileRef
|
||||
location = "group:submodules/webp/WebP_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/libtgvoip/libtgvoip_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:submodules/TelegramUI/TelegramUI_Xcode.xcodeproj">
|
||||
</FileRef>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@
|
|||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableAddressSanitizer = "YES"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
enableUBSanitizer = "YES"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,563 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D06018E522F36A3900796784 /* DeviceAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E422F36A3900796784 /* DeviceAccess.framework */; };
|
||||
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E622F36A3F00796784 /* TelegramPresentationData.framework */; };
|
||||
D0D3285422F329A900D07EE2 /* AccountContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3285222F329A900D07EE2 /* AccountContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0D3285F22F335B000D07EE2 /* AccountContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3285E22F335B000D07EE2 /* AccountContext.swift */; };
|
||||
D0D3289D22F3461700D07EE2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3289C22F3461700D07EE2 /* Foundation.framework */; };
|
||||
D0D3289F22F3462000D07EE2 /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3289E22F3462000D07EE2 /* TelegramCore.framework */; };
|
||||
D0D328A122F3462400D07EE2 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D328A022F3462400D07EE2 /* Postbox.framework */; };
|
||||
D0D328A322F3462800D07EE2 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D328A222F3462800D07EE2 /* SwiftSignalKit.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D06018E422F36A3900796784 /* DeviceAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DeviceAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018E622F36A3F00796784 /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3284F22F329A900D07EE2 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3285222F329A900D07EE2 /* AccountContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountContext.h; sourceTree = "<group>"; };
|
||||
D0D3285322F329A900D07EE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D0D3285E22F335B000D07EE2 /* AccountContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountContext.swift; sourceTree = "<group>"; };
|
||||
D0D3289C22F3461700D07EE2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D0D3289E22F3462000D07EE2 /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D328A022F3462400D07EE2 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D328A222F3462800D07EE2 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D0D3284C22F329A900D07EE2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */,
|
||||
D06018E522F36A3900796784 /* DeviceAccess.framework in Frameworks */,
|
||||
D0D328A322F3462800D07EE2 /* SwiftSignalKit.framework in Frameworks */,
|
||||
D0D328A122F3462400D07EE2 /* Postbox.framework in Frameworks */,
|
||||
D0D3289F22F3462000D07EE2 /* TelegramCore.framework in Frameworks */,
|
||||
D0D3289D22F3461700D07EE2 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D0D3284522F329A900D07EE2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3285322F329A900D07EE2 /* Info.plist */,
|
||||
D0D3285122F329A900D07EE2 /* Sources */,
|
||||
D0D3285022F329A900D07EE2 /* Products */,
|
||||
D0D3289B22F3461700D07EE2 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3285022F329A900D07EE2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3284F22F329A900D07EE2 /* AccountContext.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3285122F329A900D07EE2 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3285222F329A900D07EE2 /* AccountContext.h */,
|
||||
D0D3285E22F335B000D07EE2 /* AccountContext.swift */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3289B22F3461700D07EE2 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018E622F36A3F00796784 /* TelegramPresentationData.framework */,
|
||||
D06018E422F36A3900796784 /* DeviceAccess.framework */,
|
||||
D0D328A222F3462800D07EE2 /* SwiftSignalKit.framework */,
|
||||
D0D328A022F3462400D07EE2 /* Postbox.framework */,
|
||||
D0D3289E22F3462000D07EE2 /* TelegramCore.framework */,
|
||||
D0D3289C22F3461700D07EE2 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D0D3284A22F329A900D07EE2 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3285422F329A900D07EE2 /* AccountContext.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D0D3284E22F329A900D07EE2 /* AccountContext */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D0D3285722F329A900D07EE2 /* Build configuration list for PBXNativeTarget "AccountContext" */;
|
||||
buildPhases = (
|
||||
D0D3284A22F329A900D07EE2 /* Headers */,
|
||||
D0D3284B22F329A900D07EE2 /* Sources */,
|
||||
D0D3284C22F329A900D07EE2 /* Frameworks */,
|
||||
D0D3284D22F329A900D07EE2 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = AccountContext;
|
||||
productName = AccountContext;
|
||||
productReference = D0D3284F22F329A900D07EE2 /* AccountContext.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D0D3284622F329A900D07EE2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D0D3284E22F329A900D07EE2 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D0D3284922F329A900D07EE2 /* Build configuration list for PBXProject "AccountContext_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D0D3284522F329A900D07EE2;
|
||||
productRefGroup = D0D3285022F329A900D07EE2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D0D3284E22F329A900D07EE2 /* AccountContext */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D0D3284D22F329A900D07EE2 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D0D3284B22F329A900D07EE2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3285F22F335B000D07EE2 /* AccountContext.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D0D3285522F329A900D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3285622F329A900D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3285822F329A900D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AccountContext;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3285922F329A900D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AccountContext;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3285A22F32F5900D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3285B22F32F5900D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AccountContext;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3285C22F32F6B00D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D0D3285D22F32F6B00D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AccountContext;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D0D3284922F329A900D07EE2 /* Build configuration list for PBXProject "AccountContext_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3285522F329A900D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3285A22F32F5900D07EE2 /* DebugHockeyapp */,
|
||||
D0D3285622F329A900D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3285C22F32F6B00D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3285722F329A900D07EE2 /* Build configuration list for PBXNativeTarget "AccountContext" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3285822F329A900D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3285B22F32F5900D07EE2 /* DebugHockeyapp */,
|
||||
D0D3285922F329A900D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3285D22F32F6B00D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D0D3284622F329A900D07EE2 /* Project object */;
|
||||
}
|
||||
22
submodules/AccountContext/Info.plist
Normal file
22
submodules/AccountContext/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
19
submodules/AccountContext/Sources/AccountContext.h
Normal file
19
submodules/AccountContext/Sources/AccountContext.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// AccountContext.h
|
||||
// AccountContext
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for AccountContext.
|
||||
FOUNDATION_EXPORT double AccountContextVersionNumber;
|
||||
|
||||
//! Project version string for AccountContext.
|
||||
FOUNDATION_EXPORT const unsigned char AccountContextVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <AccountContext/PublicHeader.h>
|
||||
|
||||
|
||||
110
submodules/AccountContext/Sources/AccountContext.swift
Normal file
110
submodules/AccountContext/Sources/AccountContext.swift
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
|
||||
public final class TelegramApplicationOpenUrlCompletion {
|
||||
public let completion: (Bool) -> Void
|
||||
|
||||
public init(completion: @escaping (Bool) -> Void) {
|
||||
self.completion = completion
|
||||
}
|
||||
}
|
||||
|
||||
public enum AccessType {
|
||||
case notDetermined
|
||||
case allowed
|
||||
case denied
|
||||
case restricted
|
||||
case unreachable
|
||||
}
|
||||
|
||||
public final class TelegramApplicationBindings {
|
||||
public let isMainApp: Bool
|
||||
public let containerPath: String
|
||||
public let appSpecificScheme: String
|
||||
public let openUrl: (String) -> Void
|
||||
public let openUniversalUrl: (String, TelegramApplicationOpenUrlCompletion) -> Void
|
||||
public let canOpenUrl: (String) -> Bool
|
||||
public let getTopWindow: () -> UIWindow?
|
||||
public let displayNotification: (String) -> Void
|
||||
public let applicationInForeground: Signal<Bool, NoError>
|
||||
public let applicationIsActive: Signal<Bool, NoError>
|
||||
public let clearMessageNotifications: ([MessageId]) -> Void
|
||||
public let pushIdleTimerExtension: () -> Disposable
|
||||
public let openSettings: () -> Void
|
||||
public let openAppStorePage: () -> Void
|
||||
public let registerForNotifications: (@escaping (Bool) -> Void) -> Void
|
||||
public let requestSiriAuthorization: (@escaping (Bool) -> Void) -> Void
|
||||
public let siriAuthorization: () -> AccessType
|
||||
public let getWindowHost: () -> WindowHost?
|
||||
public let presentNativeController: (UIViewController) -> Void
|
||||
public let dismissNativeController: () -> Void
|
||||
public let getAvailableAlternateIcons: () -> [PresentationAppIcon]
|
||||
public let getAlternateIconName: () -> String?
|
||||
public let requestSetAlternateIconName: (String?, @escaping (Bool) -> Void) -> Void
|
||||
|
||||
public init(isMainApp: Bool, containerPath: String, appSpecificScheme: String, openUrl: @escaping (String) -> Void, openUniversalUrl: @escaping (String, TelegramApplicationOpenUrlCompletion) -> Void, canOpenUrl: @escaping (String) -> Bool, getTopWindow: @escaping () -> UIWindow?, displayNotification: @escaping (String) -> Void, applicationInForeground: Signal<Bool, NoError>, applicationIsActive: Signal<Bool, NoError>, clearMessageNotifications: @escaping ([MessageId]) -> Void, pushIdleTimerExtension: @escaping () -> Disposable, openSettings: @escaping () -> Void, openAppStorePage: @escaping () -> Void, registerForNotifications: @escaping (@escaping (Bool) -> Void) -> Void, requestSiriAuthorization: @escaping (@escaping (Bool) -> Void) -> Void, siriAuthorization: @escaping () -> AccessType, getWindowHost: @escaping () -> WindowHost?, presentNativeController: @escaping (UIViewController) -> Void, dismissNativeController: @escaping () -> Void, getAvailableAlternateIcons: @escaping () -> [PresentationAppIcon], getAlternateIconName: @escaping () -> String?, requestSetAlternateIconName: @escaping (String?, @escaping (Bool) -> Void) -> Void) {
|
||||
self.isMainApp = isMainApp
|
||||
self.containerPath = containerPath
|
||||
self.appSpecificScheme = appSpecificScheme
|
||||
self.openUrl = openUrl
|
||||
self.openUniversalUrl = openUniversalUrl
|
||||
self.canOpenUrl = canOpenUrl
|
||||
self.getTopWindow = getTopWindow
|
||||
self.displayNotification = displayNotification
|
||||
self.applicationInForeground = applicationInForeground
|
||||
self.applicationIsActive = applicationIsActive
|
||||
self.clearMessageNotifications = clearMessageNotifications
|
||||
self.pushIdleTimerExtension = pushIdleTimerExtension
|
||||
self.openSettings = openSettings
|
||||
self.openAppStorePage = openAppStorePage
|
||||
self.registerForNotifications = registerForNotifications
|
||||
self.requestSiriAuthorization = requestSiriAuthorization
|
||||
self.siriAuthorization = siriAuthorization
|
||||
self.presentNativeController = presentNativeController
|
||||
self.dismissNativeController = dismissNativeController
|
||||
self.getWindowHost = getWindowHost
|
||||
self.getAvailableAlternateIcons = getAvailableAlternateIcons
|
||||
self.getAlternateIconName = getAlternateIconName
|
||||
self.requestSetAlternateIconName = requestSetAlternateIconName
|
||||
}
|
||||
}
|
||||
|
||||
public enum TextLinkItemActionType {
|
||||
case tap
|
||||
case longTap
|
||||
}
|
||||
|
||||
public enum TextLinkItem {
|
||||
case url(String)
|
||||
case mention(String)
|
||||
case hashtag(String?, String)
|
||||
}
|
||||
|
||||
public protocol SharedAccountContext: class {
|
||||
var accountManager: AccountManager { get }
|
||||
var currentPresentationData: Atomic<PresentationData> { get }
|
||||
var presentationData: Signal<PresentationData, NoError> { get }
|
||||
var applicationBindings: TelegramApplicationBindings { get }
|
||||
|
||||
func handleTextLinkAction(context: AccountContext, peerId: PeerId?, navigateDisposable: MetaDisposable, controller: ViewController, action: TextLinkItemActionType, itemLink: TextLinkItem)
|
||||
}
|
||||
|
||||
public protocol AccountContext: class {
|
||||
var genericSharedContext: SharedAccountContext { get }
|
||||
var account: Account { get }
|
||||
}
|
||||
|
||||
public final class TempAccountContext: AccountContext {
|
||||
public let genericSharedContext: SharedAccountContext
|
||||
public let account: Account
|
||||
|
||||
init(genericSharedContext: SharedAccountContext, account: Account) {
|
||||
self.genericSharedContext = genericSharedContext
|
||||
self.account = account
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,555 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D060183122F35C3D00796784 /* ActivityIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = D060182F22F35C3D00796784 /* ActivityIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D060183C22F35C8100796784 /* ActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060183B22F35C8100796784 /* ActivityIndicator.swift */; };
|
||||
D0A0B53122F3701A00628AF3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0B53022F3701A00628AF3 /* UIKit.framework */; };
|
||||
D0A0B53322F3701F00628AF3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0B53222F3701E00628AF3 /* Foundation.framework */; };
|
||||
D0A0B53522F3702100628AF3 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0B53422F3702100628AF3 /* AsyncDisplayKit.framework */; };
|
||||
D0A0B53722F3702E00628AF3 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0B53622F3702E00628AF3 /* TelegramPresentationData.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D060182C22F35C3D00796784 /* ActivityIndicator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ActivityIndicator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060182F22F35C3D00796784 /* ActivityIndicator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActivityIndicator.h; sourceTree = "<group>"; };
|
||||
D060183022F35C3D00796784 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D060183B22F35C8100796784 /* ActivityIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityIndicator.swift; sourceTree = "<group>"; };
|
||||
D0A0B53022F3701A00628AF3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D0A0B53222F3701E00628AF3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D0A0B53422F3702100628AF3 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0A0B53622F3702E00628AF3 /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D060182922F35C3D00796784 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0A0B53722F3702E00628AF3 /* TelegramPresentationData.framework in Frameworks */,
|
||||
D0A0B53522F3702100628AF3 /* AsyncDisplayKit.framework in Frameworks */,
|
||||
D0A0B53322F3701F00628AF3 /* Foundation.framework in Frameworks */,
|
||||
D0A0B53122F3701A00628AF3 /* UIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D060182222F35C3D00796784 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060183022F35C3D00796784 /* Info.plist */,
|
||||
D060182E22F35C3D00796784 /* Sources */,
|
||||
D060182D22F35C3D00796784 /* Products */,
|
||||
D0A0B52F22F3701800628AF3 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060182D22F35C3D00796784 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060182C22F35C3D00796784 /* ActivityIndicator.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060182E22F35C3D00796784 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060183B22F35C8100796784 /* ActivityIndicator.swift */,
|
||||
D060182F22F35C3D00796784 /* ActivityIndicator.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0A0B52F22F3701800628AF3 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0A0B53622F3702E00628AF3 /* TelegramPresentationData.framework */,
|
||||
D0A0B53422F3702100628AF3 /* AsyncDisplayKit.framework */,
|
||||
D0A0B53222F3701E00628AF3 /* Foundation.framework */,
|
||||
D0A0B53022F3701A00628AF3 /* UIKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D060182722F35C3D00796784 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060183122F35C3D00796784 /* ActivityIndicator.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D060182B22F35C3D00796784 /* ActivityIndicator */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D060183422F35C3D00796784 /* Build configuration list for PBXNativeTarget "ActivityIndicator" */;
|
||||
buildPhases = (
|
||||
D060182722F35C3D00796784 /* Headers */,
|
||||
D060182822F35C3D00796784 /* Sources */,
|
||||
D060182922F35C3D00796784 /* Frameworks */,
|
||||
D060182A22F35C3D00796784 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ActivityIndicator;
|
||||
productName = ActivityIndicator;
|
||||
productReference = D060182C22F35C3D00796784 /* ActivityIndicator.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D060182322F35C3D00796784 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D060182B22F35C3D00796784 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D060182622F35C3D00796784 /* Build configuration list for PBXProject "ActivityIndicator_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D060182222F35C3D00796784;
|
||||
productRefGroup = D060182D22F35C3D00796784 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D060182B22F35C3D00796784 /* ActivityIndicator */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D060182A22F35C3D00796784 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D060182822F35C3D00796784 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060183C22F35C8100796784 /* ActivityIndicator.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D060183222F35C3D00796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060183322F35C3D00796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060183522F35C3D00796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ActivityIndicator;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060183622F35C3D00796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ActivityIndicator;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060183722F35C5400796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060183822F35C5400796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ActivityIndicator;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060183922F35C5F00796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D060183A22F35C5F00796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ActivityIndicator;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D060182622F35C3D00796784 /* Build configuration list for PBXProject "ActivityIndicator_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060183222F35C3D00796784 /* DebugAppStoreLLC */,
|
||||
D060183722F35C5400796784 /* DebugHockeyapp */,
|
||||
D060183322F35C3D00796784 /* ReleaseAppStoreLLC */,
|
||||
D060183922F35C5F00796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060183422F35C3D00796784 /* Build configuration list for PBXNativeTarget "ActivityIndicator" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060183522F35C3D00796784 /* DebugAppStoreLLC */,
|
||||
D060183822F35C5400796784 /* DebugHockeyapp */,
|
||||
D060183622F35C3D00796784 /* ReleaseAppStoreLLC */,
|
||||
D060183A22F35C5F00796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D060182322F35C3D00796784 /* Project object */;
|
||||
}
|
||||
22
submodules/ActivityIndicator/Info.plist
Normal file
22
submodules/ActivityIndicator/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
19
submodules/ActivityIndicator/Sources/ActivityIndicator.h
Normal file
19
submodules/ActivityIndicator/Sources/ActivityIndicator.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// ActivityIndicator.h
|
||||
// ActivityIndicator
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for ActivityIndicator.
|
||||
FOUNDATION_EXPORT double ActivityIndicatorVersionNumber;
|
||||
|
||||
//! Project version string for ActivityIndicator.
|
||||
FOUNDATION_EXPORT const unsigned char ActivityIndicatorVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ActivityIndicator/PublicHeader.h>
|
||||
|
||||
|
||||
|
|
@ -15,55 +15,55 @@ private func convertIndicatorColor(_ color: UIColor) -> UIColor {
|
|||
}
|
||||
}
|
||||
|
||||
enum ActivityIndicatorType: Equatable {
|
||||
public enum ActivityIndicatorType: Equatable {
|
||||
case navigationAccent(PresentationTheme)
|
||||
case custom(UIColor, CGFloat, CGFloat, Bool)
|
||||
|
||||
static func ==(lhs: ActivityIndicatorType, rhs: ActivityIndicatorType) -> Bool {
|
||||
public static func ==(lhs: ActivityIndicatorType, rhs: ActivityIndicatorType) -> Bool {
|
||||
switch lhs {
|
||||
case let .navigationAccent(lhsTheme):
|
||||
if case let .navigationAccent(rhsTheme) = rhs, lhsTheme === rhsTheme {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .custom(lhsColor, lhsDiameter, lhsWidth, lhsForceCustom):
|
||||
if case let .custom(rhsColor, rhsDiameter, rhsWidth, rhsForceCustom) = rhs, lhsColor.isEqual(rhsColor), lhsDiameter == rhsDiameter, lhsWidth == rhsWidth, lhsForceCustom == rhsForceCustom {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .navigationAccent(lhsTheme):
|
||||
if case let .navigationAccent(rhsTheme) = rhs, lhsTheme === rhsTheme {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .custom(lhsColor, lhsDiameter, lhsWidth, lhsForceCustom):
|
||||
if case let .custom(rhsColor, rhsDiameter, rhsWidth, rhsForceCustom) = rhs, lhsColor.isEqual(rhsColor), lhsDiameter == rhsDiameter, lhsWidth == rhsWidth, lhsForceCustom == rhsForceCustom {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum ActivityIndicatorSpeed {
|
||||
public enum ActivityIndicatorSpeed {
|
||||
case regular
|
||||
case slow
|
||||
}
|
||||
|
||||
final class ActivityIndicator: ASDisplayNode {
|
||||
var type: ActivityIndicatorType {
|
||||
public final class ActivityIndicator: ASDisplayNode {
|
||||
public var type: ActivityIndicatorType {
|
||||
didSet {
|
||||
switch self.type {
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorNode.image = PresentationResourcesRootController.navigationIndefiniteActivityImage(theme)
|
||||
case let .custom(color, diameter, lineWidth, _):
|
||||
self.indicatorNode.image = generateIndefiniteActivityIndicatorImage(color: color, diameter: diameter, lineWidth: lineWidth)
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorNode.image = PresentationResourcesRootController.navigationIndefiniteActivityImage(theme)
|
||||
case let .custom(color, diameter, lineWidth, _):
|
||||
self.indicatorNode.image = generateIndefiniteActivityIndicatorImage(color: color, diameter: diameter, lineWidth: lineWidth)
|
||||
}
|
||||
|
||||
switch self.type {
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorView?.color = theme.rootController.navigationBar.controlColor
|
||||
case let .custom(color, diameter, lineWidth, _):
|
||||
self.indicatorView?.color = convertIndicatorColor(color)
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorView?.color = theme.rootController.navigationBar.controlColor
|
||||
case let .custom(color, _, _, _):
|
||||
self.indicatorView?.color = convertIndicatorColor(color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var currentInHierarchy = false
|
||||
|
||||
override var isHidden: Bool {
|
||||
override public var isHidden: Bool {
|
||||
didSet {
|
||||
self.updateAnimation()
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ final class ActivityIndicator: ASDisplayNode {
|
|||
private let indicatorNode: ASImageNode
|
||||
private var indicatorView: UIActivityIndicatorView?
|
||||
|
||||
init(type: ActivityIndicatorType, speed: ActivityIndicatorSpeed = .regular) {
|
||||
public init(type: ActivityIndicatorType, speed: ActivityIndicatorSpeed = .regular) {
|
||||
self.type = type
|
||||
self.speed = speed
|
||||
|
||||
|
|
@ -86,28 +86,28 @@ final class ActivityIndicator: ASDisplayNode {
|
|||
super.init()
|
||||
|
||||
switch type {
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorNode.image = PresentationResourcesRootController.navigationIndefiniteActivityImage(theme)
|
||||
case let .custom(color, diameter, lineWidth, forceCustom):
|
||||
self.indicatorNode.image = generateIndefiniteActivityIndicatorImage(color: color, diameter: diameter, lineWidth: lineWidth)
|
||||
if forceCustom {
|
||||
self.addSubnode(self.indicatorNode)
|
||||
}
|
||||
case let .navigationAccent(theme):
|
||||
self.indicatorNode.image = PresentationResourcesRootController.navigationIndefiniteActivityImage(theme)
|
||||
case let .custom(color, diameter, lineWidth, forceCustom):
|
||||
self.indicatorNode.image = generateIndefiniteActivityIndicatorImage(color: color, diameter: diameter, lineWidth: lineWidth)
|
||||
if forceCustom {
|
||||
self.addSubnode(self.indicatorNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let indicatorView = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge)
|
||||
let indicatorView = UIActivityIndicatorView(style: .whiteLarge)
|
||||
switch self.type {
|
||||
case let .navigationAccent(theme):
|
||||
indicatorView.color = theme.rootController.navigationBar.controlColor
|
||||
case let .custom(color, _, _, forceCustom):
|
||||
indicatorView.color = convertIndicatorColor(color)
|
||||
if !forceCustom {
|
||||
self.view.addSubview(indicatorView)
|
||||
}
|
||||
case let .navigationAccent(theme):
|
||||
indicatorView.color = theme.rootController.navigationBar.controlColor
|
||||
case let .custom(color, _, _, forceCustom):
|
||||
indicatorView.color = convertIndicatorColor(color)
|
||||
if !forceCustom {
|
||||
self.view.addSubview(indicatorView)
|
||||
}
|
||||
}
|
||||
self.indicatorView = indicatorView
|
||||
let size = self.bounds.size
|
||||
|
|
@ -122,17 +122,17 @@ final class ActivityIndicator: ASDisplayNode {
|
|||
if self.isAnimating {
|
||||
self.indicatorView?.startAnimating()
|
||||
let basicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
switch self.speed {
|
||||
case .regular:
|
||||
basicAnimation.duration = 0.5
|
||||
case .slow:
|
||||
basicAnimation.duration = 0.7
|
||||
case .regular:
|
||||
basicAnimation.duration = 0.5
|
||||
case .slow:
|
||||
basicAnimation.duration = 0.7
|
||||
}
|
||||
basicAnimation.fromValue = NSNumber(value: Float(0.0))
|
||||
basicAnimation.toValue = NSNumber(value: Float.pi * 2.0)
|
||||
basicAnimation.repeatCount = Float.infinity
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear)
|
||||
basicAnimation.beginTime = 1.0
|
||||
|
||||
self.indicatorNode.layer.add(basicAnimation, forKey: "progressRotation")
|
||||
|
|
@ -148,30 +148,30 @@ final class ActivityIndicator: ASDisplayNode {
|
|||
self.isAnimating = !self.isHidden && self.currentInHierarchy
|
||||
}
|
||||
|
||||
override func willEnterHierarchy() {
|
||||
override public func willEnterHierarchy() {
|
||||
super.willEnterHierarchy()
|
||||
|
||||
self.currentInHierarchy = true
|
||||
self.updateAnimation()
|
||||
}
|
||||
|
||||
override func didExitHierarchy() {
|
||||
override public func didExitHierarchy() {
|
||||
super.didExitHierarchy()
|
||||
|
||||
self.currentInHierarchy = false
|
||||
self.updateAnimation()
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
switch self.type {
|
||||
case .navigationAccent:
|
||||
return CGSize(width: 22.0, height: 22.0)
|
||||
case let .custom(_, diameter, _, _):
|
||||
return CGSize(width: diameter, height: diameter)
|
||||
case .navigationAccent:
|
||||
return CGSize(width: 22.0, height: 22.0)
|
||||
case let .custom(_, diameter, _, _):
|
||||
return CGSize(width: diameter, height: diameter)
|
||||
}
|
||||
}
|
||||
|
||||
override func layout() {
|
||||
override public func layout() {
|
||||
super.layout()
|
||||
|
||||
let size = self.bounds.size
|
||||
|
|
@ -183,12 +183,12 @@ final class ActivityIndicator: ASDisplayNode {
|
|||
let indicatorSize: CGSize
|
||||
let shouldScale: Bool
|
||||
switch self.type {
|
||||
case .navigationAccent:
|
||||
indicatorSize = CGSize(width: 22.0, height: 22.0)
|
||||
shouldScale = false
|
||||
case let .custom(_, diameter, _, forceDefault):
|
||||
indicatorSize = CGSize(width: diameter, height: diameter)
|
||||
shouldScale = !forceDefault
|
||||
case .navigationAccent:
|
||||
indicatorSize = CGSize(width: 22.0, height: 22.0)
|
||||
shouldScale = false
|
||||
case let .custom(_, diameter, _, forceDefault):
|
||||
indicatorSize = CGSize(width: diameter, height: diameter)
|
||||
shouldScale = !forceDefault
|
||||
}
|
||||
self.indicatorNode.frame = CGRect(origin: CGPoint(x: floor((size.width - indicatorSize.width) / 2.0), y: floor((size.height - indicatorSize.height) / 2.0)), size: indicatorSize)
|
||||
if shouldScale, let indicatorView = self.indicatorView {
|
||||
|
|
@ -0,0 +1,559 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D060187122F35FCD00796784 /* AnimationUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D060186F22F35FCD00796784 /* AnimationUI.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D06018A422F361E800796784 /* AnimationNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018A322F361E800796784 /* AnimationNode.swift */; };
|
||||
D06018A722F361F400796784 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018A622F361F400796784 /* Foundation.framework */; };
|
||||
D06018A922F361F900796784 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018A822F361F800796784 /* UIKit.framework */; };
|
||||
D06018AB22F361FC00796784 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018AA22F361FC00796784 /* AsyncDisplayKit.framework */; };
|
||||
D06018AD22F361FF00796784 /* Lottie.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018AC22F361FF00796784 /* Lottie.framework */; };
|
||||
D06018AF22F3641F00796784 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018AE22F3641F00796784 /* FrameworkBundle.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D060186C22F35FCD00796784 /* AnimationUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AnimationUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060186F22F35FCD00796784 /* AnimationUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimationUI.h; sourceTree = "<group>"; };
|
||||
D060187022F35FCD00796784 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D06018A322F361E800796784 /* AnimationNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationNode.swift; sourceTree = "<group>"; };
|
||||
D06018A622F361F400796784 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D06018A822F361F800796784 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D06018AA22F361FC00796784 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018AC22F361FF00796784 /* Lottie.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Lottie.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018AE22F3641F00796784 /* FrameworkBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D060186922F35FCD00796784 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018AD22F361FF00796784 /* Lottie.framework in Frameworks */,
|
||||
D06018AB22F361FC00796784 /* AsyncDisplayKit.framework in Frameworks */,
|
||||
D06018A922F361F900796784 /* UIKit.framework in Frameworks */,
|
||||
D06018A722F361F400796784 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D060186222F35FCD00796784 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060187022F35FCD00796784 /* Info.plist */,
|
||||
D060186E22F35FCD00796784 /* Sources */,
|
||||
D060186D22F35FCD00796784 /* Products */,
|
||||
D06018A522F361F400796784 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060186D22F35FCD00796784 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060186C22F35FCD00796784 /* AnimationUI.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060186E22F35FCD00796784 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018A322F361E800796784 /* AnimationNode.swift */,
|
||||
D060186F22F35FCD00796784 /* AnimationUI.h */,
|
||||
D06018AE22F3641F00796784 /* FrameworkBundle.swift */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D06018A522F361F400796784 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018AC22F361FF00796784 /* Lottie.framework */,
|
||||
D06018AA22F361FC00796784 /* AsyncDisplayKit.framework */,
|
||||
D06018A822F361F800796784 /* UIKit.framework */,
|
||||
D06018A622F361F400796784 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D060186722F35FCD00796784 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060187122F35FCD00796784 /* AnimationUI.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D060186B22F35FCD00796784 /* AnimationUI */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D060187422F35FCD00796784 /* Build configuration list for PBXNativeTarget "AnimationUI" */;
|
||||
buildPhases = (
|
||||
D060186722F35FCD00796784 /* Headers */,
|
||||
D060186822F35FCD00796784 /* Sources */,
|
||||
D060186922F35FCD00796784 /* Frameworks */,
|
||||
D060186A22F35FCD00796784 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = AnimationUI;
|
||||
productName = AnimationUI;
|
||||
productReference = D060186C22F35FCD00796784 /* AnimationUI.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D060186322F35FCD00796784 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D060186B22F35FCD00796784 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D060186622F35FCD00796784 /* Build configuration list for PBXProject "AnimationUI_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D060186222F35FCD00796784;
|
||||
productRefGroup = D060186D22F35FCD00796784 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D060186B22F35FCD00796784 /* AnimationUI */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D060186A22F35FCD00796784 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D060186822F35FCD00796784 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018AF22F3641F00796784 /* FrameworkBundle.swift in Sources */,
|
||||
D06018A422F361E800796784 /* AnimationNode.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D060187222F35FCD00796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060187322F35FCD00796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060187522F35FCD00796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AnimationUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060187622F35FCD00796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AnimationUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060187722F35FE900796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060187822F35FE900796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AnimationUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060187922F35FF700796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D060187A22F35FF700796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.AnimationUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D060186622F35FCD00796784 /* Build configuration list for PBXProject "AnimationUI_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060187222F35FCD00796784 /* DebugAppStoreLLC */,
|
||||
D060187722F35FE900796784 /* DebugHockeyapp */,
|
||||
D060187322F35FCD00796784 /* ReleaseAppStoreLLC */,
|
||||
D060187922F35FF700796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060187422F35FCD00796784 /* Build configuration list for PBXNativeTarget "AnimationUI" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060187522F35FCD00796784 /* DebugAppStoreLLC */,
|
||||
D060187822F35FE900796784 /* DebugHockeyapp */,
|
||||
D060187622F35FCD00796784 /* ReleaseAppStoreLLC */,
|
||||
D060187A22F35FF700796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D060186322F35FCD00796784 /* Project object */;
|
||||
}
|
||||
22
submodules/AnimationUI/Info.plist
Normal file
22
submodules/AnimationUI/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -3,9 +3,9 @@ import UIKit
|
|||
import AsyncDisplayKit
|
||||
import Lottie
|
||||
|
||||
final class AnimationNode : ASDisplayNode {
|
||||
public final class AnimationNode : ASDisplayNode {
|
||||
private let scale: CGFloat
|
||||
var speed: CGFloat = 1.0 {
|
||||
public var speed: CGFloat = 1.0 {
|
||||
didSet {
|
||||
if let animationView = animationView() {
|
||||
animationView.animationSpeed = speed
|
||||
|
|
@ -15,10 +15,10 @@ final class AnimationNode : ASDisplayNode {
|
|||
|
||||
private var colorCallbacks: [LOTColorValueCallback] = []
|
||||
|
||||
var played = false
|
||||
var completion: (() -> Void)?
|
||||
public var played = false
|
||||
public var completion: (() -> Void)?
|
||||
|
||||
init(animation: String? = nil, colors: [String: UIColor]? = nil, scale: CGFloat = 1.0) {
|
||||
public init(animation: String? = nil, colors: [String: UIColor]? = nil, scale: CGFloat = 1.0) {
|
||||
self.scale = scale
|
||||
|
||||
super.init()
|
||||
|
|
@ -47,21 +47,21 @@ final class AnimationNode : ASDisplayNode {
|
|||
})
|
||||
}
|
||||
|
||||
func setAnimation(name: String) {
|
||||
public func setAnimation(name: String) {
|
||||
if let url = frameworkBundle.url(forResource: name, withExtension: "json"), let composition = LOTComposition(filePath: url.path) {
|
||||
self.animationView()?.sceneModel = composition
|
||||
}
|
||||
}
|
||||
|
||||
func setAnimation(json: [AnyHashable: Any]) {
|
||||
public func setAnimation(json: [AnyHashable: Any]) {
|
||||
self.animationView()?.setAnimation(json: json)
|
||||
}
|
||||
|
||||
func animationView() -> LOTAnimationView? {
|
||||
public func animationView() -> LOTAnimationView? {
|
||||
return self.view as? LOTAnimationView
|
||||
}
|
||||
|
||||
func play() {
|
||||
public func play() {
|
||||
if let animationView = animationView(), !animationView.isAnimationPlaying, !self.played {
|
||||
self.played = true
|
||||
animationView.play { [weak self] _ in
|
||||
|
|
@ -70,21 +70,21 @@ final class AnimationNode : ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
func loop() {
|
||||
public func loop() {
|
||||
if let animationView = animationView() {
|
||||
animationView.loopAnimation = true
|
||||
animationView.play()
|
||||
}
|
||||
}
|
||||
|
||||
func reset() {
|
||||
public func reset() {
|
||||
if self.played, let animationView = animationView() {
|
||||
self.played = false
|
||||
animationView.stop()
|
||||
}
|
||||
}
|
||||
|
||||
func preferredSize() -> CGSize? {
|
||||
public func preferredSize() -> CGSize? {
|
||||
if let animationView = animationView(), let sceneModel = animationView.sceneModel {
|
||||
return CGSize(width: sceneModel.compBounds.width * self.scale, height: sceneModel.compBounds.height * self.scale)
|
||||
} else {
|
||||
19
submodules/AnimationUI/Sources/AnimationUI.h
Normal file
19
submodules/AnimationUI/Sources/AnimationUI.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// AnimationUI.h
|
||||
// AnimationUI
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for AnimationUI.
|
||||
FOUNDATION_EXPORT double AnimationUIVersionNumber;
|
||||
|
||||
//! Project version string for AnimationUI.
|
||||
FOUNDATION_EXPORT const unsigned char AnimationUIVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <AnimationUI/PublicHeader.h>
|
||||
|
||||
|
||||
7
submodules/AnimationUI/Sources/FrameworkBundle.swift
Normal file
7
submodules/AnimationUI/Sources/FrameworkBundle.swift
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
private class FrameworkBundleClass: NSObject {
|
||||
}
|
||||
|
||||
let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self)
|
||||
555
submodules/CheckNode/CheckNode_Xcode.xcodeproj/project.pbxproj
Normal file
555
submodules/CheckNode/CheckNode_Xcode.xcodeproj/project.pbxproj
Normal file
|
|
@ -0,0 +1,555 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D06018CD22F3665900796784 /* CheckNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D06018CB22F3665900796784 /* CheckNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D06018D822F366B000796784 /* CheckNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018D722F366B000796784 /* CheckNode.swift */; };
|
||||
D06018DB22F366BB00796784 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018DA22F366BB00796784 /* UIKit.framework */; };
|
||||
D06018DD22F366BE00796784 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018DC22F366BE00796784 /* Foundation.framework */; };
|
||||
D06018DF22F366C200796784 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018DE22F366C200796784 /* AsyncDisplayKit.framework */; };
|
||||
D06018E122F366C500796784 /* LegacyComponents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E022F366C500796784 /* LegacyComponents.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D06018C822F3665900796784 /* CheckNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CheckNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018CB22F3665900796784 /* CheckNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckNode.h; sourceTree = "<group>"; };
|
||||
D06018CC22F3665900796784 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D06018D722F366B000796784 /* CheckNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckNode.swift; sourceTree = "<group>"; };
|
||||
D06018DA22F366BB00796784 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D06018DC22F366BE00796784 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D06018DE22F366C200796784 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018E022F366C500796784 /* LegacyComponents.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LegacyComponents.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D06018C522F3665900796784 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018E122F366C500796784 /* LegacyComponents.framework in Frameworks */,
|
||||
D06018DF22F366C200796784 /* AsyncDisplayKit.framework in Frameworks */,
|
||||
D06018DD22F366BE00796784 /* Foundation.framework in Frameworks */,
|
||||
D06018DB22F366BB00796784 /* UIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D06018BE22F3665900796784 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018CC22F3665900796784 /* Info.plist */,
|
||||
D06018CA22F3665900796784 /* Sources */,
|
||||
D06018C922F3665900796784 /* Products */,
|
||||
D06018D922F366BA00796784 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D06018C922F3665900796784 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018C822F3665900796784 /* CheckNode.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D06018CA22F3665900796784 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018D722F366B000796784 /* CheckNode.swift */,
|
||||
D06018CB22F3665900796784 /* CheckNode.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D06018D922F366BA00796784 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018E022F366C500796784 /* LegacyComponents.framework */,
|
||||
D06018DE22F366C200796784 /* AsyncDisplayKit.framework */,
|
||||
D06018DC22F366BE00796784 /* Foundation.framework */,
|
||||
D06018DA22F366BB00796784 /* UIKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D06018C322F3665900796784 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018CD22F3665900796784 /* CheckNode.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D06018C722F3665900796784 /* CheckNode */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D06018D022F3665900796784 /* Build configuration list for PBXNativeTarget "CheckNode" */;
|
||||
buildPhases = (
|
||||
D06018C322F3665900796784 /* Headers */,
|
||||
D06018C422F3665900796784 /* Sources */,
|
||||
D06018C522F3665900796784 /* Frameworks */,
|
||||
D06018C622F3665900796784 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CheckNode;
|
||||
productName = CheckNode;
|
||||
productReference = D06018C822F3665900796784 /* CheckNode.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D06018BF22F3665900796784 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D06018C722F3665900796784 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D06018C222F3665900796784 /* Build configuration list for PBXProject "CheckNode_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D06018BE22F3665900796784;
|
||||
productRefGroup = D06018C922F3665900796784 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D06018C722F3665900796784 /* CheckNode */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D06018C622F3665900796784 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D06018C422F3665900796784 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018D822F366B000796784 /* CheckNode.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D06018CE22F3665900796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D06018CF22F3665900796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D06018D122F3665900796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.CheckNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D06018D222F3665900796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.CheckNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D06018D322F3667B00796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D06018D422F3667B00796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.CheckNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D06018D522F3668600796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D06018D622F3668600796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.CheckNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D06018C222F3665900796784 /* Build configuration list for PBXProject "CheckNode_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D06018CE22F3665900796784 /* DebugAppStoreLLC */,
|
||||
D06018D322F3667B00796784 /* DebugHockeyapp */,
|
||||
D06018CF22F3665900796784 /* ReleaseAppStoreLLC */,
|
||||
D06018D522F3668600796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D06018D022F3665900796784 /* Build configuration list for PBXNativeTarget "CheckNode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D06018D122F3665900796784 /* DebugAppStoreLLC */,
|
||||
D06018D422F3667B00796784 /* DebugHockeyapp */,
|
||||
D06018D222F3665900796784 /* ReleaseAppStoreLLC */,
|
||||
D06018D622F3668600796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D06018BF22F3665900796784 /* Project object */;
|
||||
}
|
||||
22
submodules/CheckNode/Info.plist
Normal file
22
submodules/CheckNode/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
19
submodules/CheckNode/Sources/CheckNode.h
Normal file
19
submodules/CheckNode/Sources/CheckNode.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// CheckNode.h
|
||||
// CheckNode
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for CheckNode.
|
||||
FOUNDATION_EXPORT double CheckNodeVersionNumber;
|
||||
|
||||
//! Project version string for CheckNode.
|
||||
FOUNDATION_EXPORT const unsigned char CheckNodeVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <CheckNode/PublicHeader.h>
|
||||
|
||||
|
||||
|
|
@ -4,13 +4,13 @@ import AsyncDisplayKit
|
|||
|
||||
import LegacyComponents
|
||||
|
||||
enum CheckNodeStyle {
|
||||
public enum CheckNodeStyle {
|
||||
case plain
|
||||
case overlay
|
||||
case navigation
|
||||
}
|
||||
|
||||
final class CheckNode: ASDisplayNode {
|
||||
public final class CheckNode: ASDisplayNode {
|
||||
private var strokeColor: UIColor
|
||||
private var fillColor: UIColor
|
||||
private var foregroundColor: UIColor
|
||||
|
|
@ -18,12 +18,12 @@ final class CheckNode: ASDisplayNode {
|
|||
|
||||
private var checkView: TGCheckButtonView?
|
||||
|
||||
private(set) var isChecked: Bool = false
|
||||
public private(set) var isChecked: Bool = false
|
||||
|
||||
private weak var target: AnyObject?
|
||||
private var action: Selector?
|
||||
|
||||
init(strokeColor: UIColor, fillColor: UIColor, foregroundColor: UIColor, style: CheckNodeStyle) {
|
||||
public init(strokeColor: UIColor, fillColor: UIColor, foregroundColor: UIColor, style: CheckNodeStyle) {
|
||||
self.strokeColor = strokeColor
|
||||
self.fillColor = fillColor
|
||||
self.foregroundColor = foregroundColor
|
||||
|
|
@ -32,21 +32,21 @@ final class CheckNode: ASDisplayNode {
|
|||
super.init()
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let style: TGCheckButtonStyle
|
||||
let checkSize: CGSize
|
||||
switch self.checkStyle {
|
||||
case .plain:
|
||||
style = TGCheckButtonStyleDefault
|
||||
checkSize = CGSize(width: 32.0, height: 32.0)
|
||||
case .overlay:
|
||||
style = TGCheckButtonStyleMedia
|
||||
checkSize = CGSize(width: 32.0, height: 32.0)
|
||||
case .navigation:
|
||||
style = TGCheckButtonStyleGallery
|
||||
checkSize = CGSize(width: 39.0, height: 39.0)
|
||||
case .plain:
|
||||
style = TGCheckButtonStyleDefault
|
||||
checkSize = CGSize(width: 32.0, height: 32.0)
|
||||
case .overlay:
|
||||
style = TGCheckButtonStyleMedia
|
||||
checkSize = CGSize(width: 32.0, height: 32.0)
|
||||
case .navigation:
|
||||
style = TGCheckButtonStyleGallery
|
||||
checkSize = CGSize(width: 39.0, height: 39.0)
|
||||
}
|
||||
let checkView = TGCheckButtonView(style: style, pallete: TGCheckButtonPallete(defaultBackgroundColor: self.fillColor, accentBackgroundColor: self.fillColor, defaultBorderColor: self.strokeColor, mediaBorderColor: self.strokeColor, chatBorderColor: self.strokeColor, check: self.foregroundColor, blueColor: self.fillColor, barBackgroundColor: self.fillColor))!
|
||||
checkView.setSelected(true, animated: false)
|
||||
|
|
@ -61,14 +61,14 @@ final class CheckNode: ASDisplayNode {
|
|||
checkView.frame = CGRect(origin: CGPoint(), size: checkSize)
|
||||
}
|
||||
|
||||
func setIsChecked(_ isChecked: Bool, animated: Bool) {
|
||||
public func setIsChecked(_ isChecked: Bool, animated: Bool) {
|
||||
if isChecked != self.isChecked {
|
||||
self.isChecked = isChecked
|
||||
self.checkView?.setSelected(isChecked, animated: animated)
|
||||
}
|
||||
}
|
||||
|
||||
func addTarget(target: AnyObject?, action: Selector) {
|
||||
public func addTarget(target: AnyObject?, action: Selector) {
|
||||
self.target = target
|
||||
self.action = action
|
||||
if self.isNodeLoaded {
|
||||
|
|
@ -12,6 +12,7 @@ import UserNotifications
|
|||
import CoreTelephony
|
||||
import TelegramPresentationData
|
||||
import LegacyComponents
|
||||
import AccountContext
|
||||
|
||||
public enum DeviceAccessMicrophoneSubject {
|
||||
case audio
|
||||
|
|
@ -42,14 +43,6 @@ public enum DeviceAccessSubject {
|
|||
case cellularData
|
||||
}
|
||||
|
||||
public enum AccessType {
|
||||
case notDetermined
|
||||
case allowed
|
||||
case denied
|
||||
case restricted
|
||||
case unreachable
|
||||
}
|
||||
|
||||
private let cachedMediaLibraryAccessStatus = Atomic<Bool?>(value: nil)
|
||||
|
||||
public func shouldDisplayNotificationsPermissionWarning(status: AccessType, suppressed: Bool) -> Bool {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import AsyncDisplayKit
|
|||
public func addAccessibilityChildren(of node: ASDisplayNode, container: Any, to list: inout [Any]) {
|
||||
if node.isAccessibilityElement {
|
||||
let element = UIAccessibilityElement(accessibilityContainer: container)
|
||||
element.accessibilityFrame = UIAccessibilityConvertFrameToScreenCoordinates(node.bounds, node.view)
|
||||
element.accessibilityFrame = UIAccessibility.convertToScreenCoordinates(node.bounds, in: node.view)
|
||||
element.accessibilityLabel = node.accessibilityLabel
|
||||
element.accessibilityValue = node.accessibilityValue
|
||||
element.accessibilityTraits = node.accessibilityTraits
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ final class ActionSheetControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||
}
|
||||
self.itemGroupsContainerNode.animateDimViewsAlpha(from: 1.0, to: 0.0, duration: 0.3)
|
||||
|
||||
self.layer.animateBounds(from: self.bounds, to: self.bounds.offsetBy(dx: 0.0, dy: -self.bounds.size.height), duration: 0.35, timingFunction: kCAMediaTimingFunctionEaseOut, removeOnCompletion: false, completion: { [weak self, weak tempDimView] _ in
|
||||
self.layer.animateBounds(from: self.bounds, to: self.bounds.offsetBy(dx: 0.0, dy: -self.bounds.size.height), duration: 0.35, timingFunction: CAMediaTimingFunctionName.easeOut.rawValue, removeOnCompletion: false, completion: { [weak self, weak tempDimView] _ in
|
||||
tempDimView?.removeFromSuperview()
|
||||
|
||||
self?.dismiss(cancelled)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public extension CALayer {
|
|||
animation.fromValue = from
|
||||
animation.toValue = to
|
||||
animation.isRemovedOnCompletion = removeOnCompletion
|
||||
animation.fillMode = kCAFillModeForwards
|
||||
animation.fillMode = .forwards
|
||||
if let completion = completion {
|
||||
animation.delegate = CALayerAnimationDelegate(animation: animation, completion: completion)
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ public extension CALayer {
|
|||
|
||||
if !delay.isZero {
|
||||
animation.beginTime = CACurrentMediaTime() + delay
|
||||
animation.fillMode = kCAFillModeBoth
|
||||
animation.fillMode = .both
|
||||
}
|
||||
|
||||
return animation
|
||||
|
|
@ -94,10 +94,10 @@ public extension CALayer {
|
|||
if let mediaTimingFunction = mediaTimingFunction {
|
||||
animation.timingFunction = mediaTimingFunction
|
||||
} else {
|
||||
animation.timingFunction = CAMediaTimingFunction(name: timingFunction)
|
||||
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName(rawValue: timingFunction))
|
||||
}
|
||||
animation.isRemovedOnCompletion = removeOnCompletion
|
||||
animation.fillMode = kCAFillModeForwards
|
||||
animation.fillMode = .forwards
|
||||
animation.speed = speed
|
||||
animation.isAdditive = additive
|
||||
if let completion = completion {
|
||||
|
|
@ -106,7 +106,7 @@ public extension CALayer {
|
|||
|
||||
if !delay.isZero {
|
||||
animation.beginTime = CACurrentMediaTime() + delay
|
||||
animation.fillMode = kCAFillModeBoth
|
||||
animation.fillMode = .both
|
||||
}
|
||||
|
||||
return animation
|
||||
|
|
@ -169,7 +169,7 @@ public extension CALayer {
|
|||
animation.fromValue = from
|
||||
animation.toValue = to
|
||||
animation.isRemovedOnCompletion = removeOnCompletion
|
||||
animation.fillMode = kCAFillModeForwards
|
||||
animation.fillMode = .forwards
|
||||
if let completion = completion {
|
||||
animation.delegate = CALayerAnimationDelegate(animation: animation, completion: completion)
|
||||
}
|
||||
|
|
@ -200,10 +200,10 @@ public extension CALayer {
|
|||
if let mediaTimingFunction = mediaTimingFunction {
|
||||
animation.timingFunction = mediaTimingFunction
|
||||
} else {
|
||||
animation.timingFunction = CAMediaTimingFunction(name: timingFunction)
|
||||
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName(rawValue: timingFunction))
|
||||
}
|
||||
animation.isRemovedOnCompletion = removeOnCompletion
|
||||
animation.fillMode = kCAFillModeForwards
|
||||
animation.fillMode = .forwards
|
||||
animation.speed = speed
|
||||
animation.isAdditive = true
|
||||
if let completion = completion {
|
||||
|
|
@ -213,19 +213,19 @@ public extension CALayer {
|
|||
self.add(animation, forKey: key)
|
||||
}
|
||||
|
||||
public func animateAlpha(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> ())? = nil) {
|
||||
public func animateAlpha(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> ())? = nil) {
|
||||
self.animate(from: NSNumber(value: Float(from)), to: NSNumber(value: Float(to)), keyPath: "opacity", timingFunction: timingFunction, duration: duration, delay: delay, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, completion: completion)
|
||||
}
|
||||
|
||||
public func animateScale(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
public func animateScale(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
self.animate(from: NSNumber(value: Float(from)), to: NSNumber(value: Float(to)), keyPath: "transform.scale", timingFunction: timingFunction, duration: duration, delay: delay, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, completion: completion)
|
||||
}
|
||||
|
||||
public func animateRotation(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
public func animateRotation(from: CGFloat, to: CGFloat, duration: Double, delay: Double = 0.0, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
self.animate(from: NSNumber(value: Float(from)), to: NSNumber(value: Float(to)), keyPath: "transform.rotation.z", timingFunction: timingFunction, duration: duration, delay: delay, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, completion: completion)
|
||||
}
|
||||
|
||||
func animatePosition(from: CGPoint, to: CGPoint, duration: Double, delay: Double = 0.0, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, additive: Bool = false, force: Bool = false, completion: ((Bool) -> Void)? = nil) {
|
||||
func animatePosition(from: CGPoint, to: CGPoint, duration: Double, delay: Double = 0.0, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, additive: Bool = false, force: Bool = false, completion: ((Bool) -> Void)? = nil) {
|
||||
if from == to && !force {
|
||||
if let completion = completion {
|
||||
completion(true)
|
||||
|
|
@ -245,20 +245,20 @@ public extension CALayer {
|
|||
self.animate(from: NSValue(cgRect: from), to: NSValue(cgRect: to), keyPath: "bounds", timingFunction: timingFunction, duration: duration, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, additive: additive, completion: completion)
|
||||
}
|
||||
|
||||
public func animateBoundsOriginXAdditive(from: CGFloat, to: CGFloat, duration: Double, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
public func animateBoundsOriginXAdditive(from: CGFloat, to: CGFloat, duration: Double, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.x", timingFunction: timingFunction, duration: duration, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, additive: true, completion: completion)
|
||||
}
|
||||
|
||||
public func animateBoundsOriginYAdditive(from: CGFloat, to: CGFloat, duration: Double, timingFunction: String = kCAMediaTimingFunctionEaseInEaseOut, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
public func animateBoundsOriginYAdditive(from: CGFloat, to: CGFloat, duration: Double, timingFunction: String = CAMediaTimingFunctionName.easeInEaseOut.rawValue, mediaTimingFunction: CAMediaTimingFunction? = nil, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.y", timingFunction: timingFunction, duration: duration, mediaTimingFunction: mediaTimingFunction, removeOnCompletion: removeOnCompletion, additive: true, completion: completion)
|
||||
}
|
||||
|
||||
public func animateBoundsOriginXAdditive(from: CGFloat, to: CGFloat, duration: Double, mediaTimingFunction: CAMediaTimingFunction) {
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.x", timingFunction: kCAMediaTimingFunctionEaseInEaseOut, duration: duration, mediaTimingFunction: mediaTimingFunction, additive: true)
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.x", timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, duration: duration, mediaTimingFunction: mediaTimingFunction, additive: true)
|
||||
}
|
||||
|
||||
public func animateBoundsOriginYAdditive(from: CGFloat, to: CGFloat, duration: Double, mediaTimingFunction: CAMediaTimingFunction) {
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.y", timingFunction: kCAMediaTimingFunctionEaseInEaseOut, duration: duration, mediaTimingFunction: mediaTimingFunction, additive: true)
|
||||
self.animate(from: from as NSNumber, to: to as NSNumber, keyPath: "bounds.origin.y", timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, duration: duration, mediaTimingFunction: mediaTimingFunction, additive: true)
|
||||
}
|
||||
|
||||
public func animatePositionKeyframes(values: [CGPoint], duration: Double, removeOnCompletion: Bool = true, completion: ((Bool) -> Void)? = nil) {
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ public extension ContainedViewLayoutTransitionCurve {
|
|||
var timingFunction: String {
|
||||
switch self {
|
||||
case .easeInOut:
|
||||
return kCAMediaTimingFunctionEaseInEaseOut
|
||||
return CAMediaTimingFunctionName.easeInEaseOut.rawValue
|
||||
case .spring:
|
||||
return kCAMediaTimingFunctionSpring
|
||||
case .custom:
|
||||
return kCAMediaTimingFunctionEaseInEaseOut
|
||||
return CAMediaTimingFunctionName.easeInEaseOut.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -36,12 +36,12 @@ public extension ContainedViewLayoutTransitionCurve {
|
|||
}
|
||||
|
||||
#if os(iOS)
|
||||
var viewAnimationOptions: UIViewAnimationOptions {
|
||||
var viewAnimationOptions: UIView.AnimationOptions {
|
||||
switch self {
|
||||
case .easeInOut:
|
||||
return [.curveEaseInOut]
|
||||
case .spring:
|
||||
return UIViewAnimationOptions(rawValue: 7 << 16)
|
||||
return UIView.AnimationOptions(rawValue: 7 << 16)
|
||||
case .custom:
|
||||
return []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final class ContextMenuActionNode: ASDisplayNode {
|
|||
|
||||
init(action: ContextMenuAction) {
|
||||
self.actionArea = AccessibilityAreaNode()
|
||||
self.actionArea.accessibilityTraits = UIAccessibilityTraitButton
|
||||
self.actionArea.accessibilityTraits = .button
|
||||
|
||||
switch action.content {
|
||||
case let .text(title, accessibilityLabel):
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public final class ContextMenuController: ViewController, KeyShortcutResponder {
|
|||
}
|
||||
|
||||
public var keyShortcuts: [KeyShortcut] {
|
||||
return [KeyShortcut(input: UIKeyInputEscape, action: { [weak self] in
|
||||
return [KeyShortcut(input: UIKeyCommand.inputEscape, action: { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.dismiss()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class DisplayLinkDispatcher: NSObject {
|
|||
} else {
|
||||
self.displayLink = CADisplayLink(target: self, selector: #selector(self.run))
|
||||
self.displayLink.isPaused = true
|
||||
self.displayLink.add(to: RunLoop.main, forMode: RunLoopMode.commonModes)
|
||||
self.displayLink.add(to: RunLoop.main, forMode: .common)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,15 +69,15 @@ public struct Font {
|
|||
|
||||
public extension NSAttributedString {
|
||||
convenience init(string: String, font: UIFont? = nil, textColor: UIColor = UIColor.black, paragraphAlignment: NSTextAlignment? = nil) {
|
||||
var attributes: [NSAttributedStringKey: AnyObject] = [:]
|
||||
var attributes: [NSAttributedString.Key: AnyObject] = [:]
|
||||
if let font = font {
|
||||
attributes[NSAttributedStringKey.font] = font
|
||||
attributes[NSAttributedString.Key.font] = font
|
||||
}
|
||||
attributes[NSAttributedStringKey.foregroundColor] = textColor
|
||||
attributes[NSAttributedString.Key.foregroundColor] = textColor
|
||||
if let paragraphAlignment = paragraphAlignment {
|
||||
let paragraphStyle = NSMutableParagraphStyle()
|
||||
paragraphStyle.alignment = paragraphAlignment
|
||||
attributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle
|
||||
attributes[NSAttributedString.Key.paragraphStyle] = paragraphStyle
|
||||
}
|
||||
self.init(string: string, attributes: attributes)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
import Accelerate
|
||||
|
||||
public let deviceColorSpace: CGColorSpace = {
|
||||
if #available(iOSApplicationExtension 9.3, *) {
|
||||
|
|
@ -13,6 +14,8 @@ public let deviceColorSpace: CGColorSpace = {
|
|||
}
|
||||
}()
|
||||
|
||||
private let grayscaleColorSpace = CGColorSpaceCreateDeviceGray()
|
||||
|
||||
let deviceScale = UIScreen.main.scale
|
||||
|
||||
public func generateImagePixel(_ size: CGSize, scale: CGFloat, pixelGenerator: (CGSize, UnsafeMutablePointer<UInt8>, Int) -> Void) -> UIImage? {
|
||||
|
|
@ -39,6 +42,74 @@ public func generateImagePixel(_ size: CGSize, scale: CGFloat, pixelGenerator: (
|
|||
return UIImage(cgImage: image, scale: scale, orientation: .up)
|
||||
}
|
||||
|
||||
private func withImageBytes(image: UIImage, _ f: (UnsafePointer<UInt8>, Int, Int, Int) -> Void) {
|
||||
let selectedScale = image.scale
|
||||
let scaledSize = CGSize(width: image.size.width * selectedScale, height: image.size.height * selectedScale)
|
||||
let bytesPerRow = (4 * Int(scaledSize.width) + 15) & (~15)
|
||||
let length = bytesPerRow * Int(scaledSize.height)
|
||||
let bytes = malloc(length)!.assumingMemoryBound(to: UInt8.self)
|
||||
memset(bytes, 0, length)
|
||||
|
||||
let bitmapInfo = CGBitmapInfo(rawValue: CGBitmapInfo.byteOrder32Little.rawValue | CGImageAlphaInfo.premultipliedFirst.rawValue)
|
||||
|
||||
guard let context = CGContext(data: bytes, width: Int(scaledSize.width), height: Int(scaledSize.height), bitsPerComponent: 8, bytesPerRow: bytesPerRow, space: deviceColorSpace, bitmapInfo: bitmapInfo.rawValue) else {
|
||||
return
|
||||
}
|
||||
|
||||
context.scaleBy(x: selectedScale, y: selectedScale)
|
||||
context.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: image.size))
|
||||
|
||||
f(bytes, Int(scaledSize.width), Int(scaledSize.height), bytesPerRow)
|
||||
}
|
||||
|
||||
public func generateGrayscaleAlphaMaskImage(image: UIImage) -> UIImage? {
|
||||
let selectedScale = image.scale
|
||||
let scaledSize = CGSize(width: image.size.width * selectedScale, height: image.size.height * selectedScale)
|
||||
let bytesPerRow = (1 * Int(scaledSize.width) + 15) & (~15)
|
||||
let length = bytesPerRow * Int(scaledSize.height)
|
||||
let bytes = malloc(length)!.assumingMemoryBound(to: UInt8.self)
|
||||
memset(bytes, 0, length)
|
||||
|
||||
guard let provider = CGDataProvider(dataInfo: bytes, data: bytes, size: length, releaseData: { bytes, _, _ in
|
||||
free(bytes)
|
||||
})
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.none.rawValue)
|
||||
|
||||
guard let context = CGContext(data: bytes, width: Int(scaledSize.width), height: Int(scaledSize.height), bitsPerComponent: 8, bytesPerRow: bytesPerRow, space: grayscaleColorSpace, bitmapInfo: bitmapInfo.rawValue) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
context.scaleBy(x: selectedScale, y: selectedScale)
|
||||
|
||||
withImageBytes(image: image, { pixels, width, height, imageBytesPerRow in
|
||||
var src = vImage_Buffer(data: UnsafeMutableRawPointer(mutating: pixels), height: vImagePixelCount(height), width: vImagePixelCount(width), rowBytes: imageBytesPerRow)
|
||||
|
||||
let permuteMap: [UInt8] = [3, 2, 1, 0]
|
||||
vImagePermuteChannels_ARGB8888(&src, &src, permuteMap, vImage_Flags(kvImageDoNotTile))
|
||||
vImageUnpremultiplyData_ARGB8888(&src, &src, vImage_Flags(kvImageDoNotTile))
|
||||
|
||||
for y in 0 ..< Int(scaledSize.height) {
|
||||
let srcRowBytes = pixels.advanced(by: y * imageBytesPerRow)
|
||||
let dstRowBytes = bytes.advanced(by: y * bytesPerRow)
|
||||
for x in 0 ..< Int(scaledSize.width) {
|
||||
let a = srcRowBytes.advanced(by: x * 4 + 0).pointee
|
||||
dstRowBytes.advanced(by: x).pointee = 0xff &- a
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
guard let image = CGImage(width: Int(scaledSize.width), height: Int(scaledSize.height), bitsPerComponent: 8, bitsPerPixel: 8, bytesPerRow: bytesPerRow, space: grayscaleColorSpace, bitmapInfo: bitmapInfo, provider: provider, decode: nil, shouldInterpolate: false, intent: .defaultIntent)
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return UIImage(cgImage: image, scale: selectedScale, orientation: .up)
|
||||
}
|
||||
|
||||
public func generateImage(_ size: CGSize, contextGenerator: (CGSize, CGContext) -> Void, opaque: Bool = false, scale: CGFloat? = nil) -> UIImage? {
|
||||
let selectedScale = scale ?? deviceScale
|
||||
let scaledSize = CGSize(width: size.width * selectedScale, height: size.height * selectedScale)
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
public var indicatorStyle: UIScrollViewIndicatorStyle = .default {
|
||||
public var indicatorStyle: UIScrollView.IndicatorStyle = .default {
|
||||
didSet {
|
||||
self.scrollView.indicatorStyle = self.indicatorStyle
|
||||
}
|
||||
|
|
@ -1015,8 +1015,8 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||
if !existingItemIndices.contains(index) {
|
||||
if let _ = previousItemFrames[WrappedGridItemNode(node: itemNode)] {
|
||||
self.removeItemNodeWithIndex(index, removeNode: false)
|
||||
itemNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseIn, removeOnCompletion: false)
|
||||
itemNode.layer.animateScale(from: 1.0, to: 0.1, duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseIn, removeOnCompletion: false, completion: { [weak itemNode] _ in
|
||||
itemNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue, removeOnCompletion: false)
|
||||
itemNode.layer.animateScale(from: 1.0, to: 0.1, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue, removeOnCompletion: false, completion: { [weak itemNode] _ in
|
||||
itemNode?.removeFromSupernode()
|
||||
})
|
||||
} else {
|
||||
|
|
@ -1025,15 +1025,15 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||
} else if let previousFrame = previousItemFrames[WrappedGridItemNode(node: itemNode)] {
|
||||
itemNode.layer.animatePosition(from: CGPoint(x: previousFrame.midX, y: previousFrame.midY + contentOffset.y), to: itemNode.layer.position, duration: duration, timingFunction: timingFunction, mediaTimingFunction: mediaTimingFunction)
|
||||
} else {
|
||||
itemNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.12, timingFunction: kCAMediaTimingFunctionEaseIn)
|
||||
itemNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.12, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue)
|
||||
itemNode.layer.animateSpring(from: 0.1 as NSNumber, to: 1.0 as NSNumber, keyPath: "transform.scale", duration: 0.5)
|
||||
}
|
||||
}
|
||||
|
||||
for itemNode in removedNodes {
|
||||
if let _ = previousItemFrames[WrappedGridItemNode(node: itemNode)] {
|
||||
itemNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.18, timingFunction: kCAMediaTimingFunctionEaseIn, removeOnCompletion: false)
|
||||
itemNode.layer.animateScale(from: 1.0, to: 0.1, duration: 0.18, timingFunction: kCAMediaTimingFunctionEaseIn, removeOnCompletion: false, completion: { [weak itemNode] _ in
|
||||
itemNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.18, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue, removeOnCompletion: false)
|
||||
itemNode.layer.animateScale(from: 1.0, to: 0.1, duration: 0.18, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue, removeOnCompletion: false, completion: { [weak itemNode] _ in
|
||||
itemNode?.removeFromSupernode()
|
||||
})
|
||||
} else {
|
||||
|
|
@ -1055,7 +1055,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||
} else if let previousFrame = previousItemFrames[WrappedGridItemNode(node: sectionNode)] {
|
||||
sectionNode.layer.animatePosition(from: CGPoint(x: previousFrame.midX, y: previousFrame.midY + contentOffset.y), to: sectionNode.layer.position, duration: duration, timingFunction: timingFunction, mediaTimingFunction: mediaTimingFunction)
|
||||
} else {
|
||||
sectionNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseIn)
|
||||
sectionNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeIn.rawValue)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1121,7 +1121,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
|
|||
|
||||
if addedNodes {
|
||||
if let verticalIndicator = verticalIndicator, self.scrollView.subviews.last !== verticalIndicator {
|
||||
verticalIndicator.superview?.bringSubview(toFront: verticalIndicator)
|
||||
verticalIndicator.superview?.bringSubviewToFront(verticalIndicator)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class ImmediateTextNode: TextNode {
|
|||
|
||||
public var trailingLineWidth: CGFloat?
|
||||
|
||||
public var highlightAttributeAction: (([NSAttributedStringKey: Any]) -> NSAttributedStringKey?)? {
|
||||
public var highlightAttributeAction: (([NSAttributedString.Key: Any]) -> NSAttributedString.Key?)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
self.updateInteractiveActions()
|
||||
|
|
@ -29,8 +29,8 @@ public class ImmediateTextNode: TextNode {
|
|||
}
|
||||
}
|
||||
|
||||
public var tapAttributeAction: (([NSAttributedStringKey: Any]) -> Void)?
|
||||
public var longTapAttributeAction: (([NSAttributedStringKey: Any]) -> Void)?
|
||||
public var tapAttributeAction: (([NSAttributedString.Key: Any]) -> Void)?
|
||||
public var longTapAttributeAction: (([NSAttributedString.Key: Any]) -> Void)?
|
||||
|
||||
public func updateLayout(_ constrainedSize: CGSize) -> CGSize {
|
||||
let makeLayout = TextNode.asyncLayout(self)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ open class LegacyPresentedController: ViewController {
|
|||
self?.dismiss()
|
||||
}*/
|
||||
if !asPresentable {
|
||||
self.addChildViewController(legacyController)
|
||||
self.addChild(legacyController)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ open class LegacyPresentedController: ViewController {
|
|||
|
||||
self.controllerNode.controllerView = self.legacyController.view
|
||||
self.controllerNode.view.addSubview(self.legacyController.view)
|
||||
self.legacyController.didMove(toParentViewController: self)
|
||||
self.legacyController.didMove(toParent: self)
|
||||
|
||||
if let controllerLoaded = self.controllerLoaded {
|
||||
controllerLoaded()
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ final class LegacyPresentedControllerNode: ASDisplayNode {
|
|||
}
|
||||
|
||||
func animateModalOut(completion: @escaping () -> Void) {
|
||||
self.layer.animatePosition(from: self.layer.position, to: CGPoint(x: self.layer.position.x, y: self.layer.position.y + self.layer.bounds.size.height), duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, completion: { _ in
|
||||
self.layer.animatePosition(from: self.layer.position, to: CGPoint(x: self.layer.position.x, y: self.layer.position.y + self.layer.bounds.size.height), duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, completion: { _ in
|
||||
completion()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import SwiftSignalKit
|
|||
import DisplayPrivate
|
||||
#endif
|
||||
|
||||
private let useBackgroundDeallocation = false
|
||||
|
||||
private let infiniteScrollSize: CGFloat = 10000.0
|
||||
private let insertionAnimationDuration: Double = 0.4
|
||||
|
||||
|
|
@ -359,7 +357,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}))
|
||||
|
||||
self.displayLink = CADisplayLink(target: DisplayLinkProxy(target: self), selector: #selector(DisplayLinkProxy.displayLinkEvent))
|
||||
self.displayLink.add(to: RunLoop.main, forMode: RunLoopMode.commonModes)
|
||||
self.displayLink.add(to: RunLoop.main, forMode: RunLoop.Mode.common)
|
||||
|
||||
if #available(iOS 10.0, *) {
|
||||
self.displayLink.preferredFramesPerSecond = 60
|
||||
|
|
@ -372,25 +370,15 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
self.pauseAnimations()
|
||||
self.displayLink.invalidate()
|
||||
|
||||
if useBackgroundDeallocation {
|
||||
assertionFailure()
|
||||
/*for itemNode in self.itemNodes {
|
||||
ASDeallocQueue.sharedDeallocation.releaseObject(inBackground: UnsafeMutablePointer(itemNode))
|
||||
}
|
||||
for itemHeaderNode in self.itemHeaderNodes {
|
||||
ASDeallocQueue.sharedDeallocatio.releaseObject(inBackground: itemHeaderNode)
|
||||
}*/
|
||||
} else {
|
||||
for i in (0 ..< self.itemNodes.count).reversed() {
|
||||
var itemNode: AnyObject? = self.itemNodes[i]
|
||||
self.itemNodes.remove(at: i)
|
||||
ASPerformMainThreadDeallocation(&itemNode)
|
||||
}
|
||||
for key in self.itemHeaderNodes.keys {
|
||||
var itemHeaderNode: AnyObject? = self.itemHeaderNodes[key]
|
||||
self.itemHeaderNodes.removeValue(forKey: key)
|
||||
ASPerformMainThreadDeallocation(&itemHeaderNode)
|
||||
}
|
||||
for i in (0 ..< self.itemNodes.count).reversed() {
|
||||
var itemNode: AnyObject? = self.itemNodes[i]
|
||||
self.itemNodes.remove(at: i)
|
||||
ASPerformMainThreadDeallocation(&itemNode)
|
||||
}
|
||||
for key in self.itemHeaderNodes.keys {
|
||||
var itemHeaderNode: AnyObject? = self.itemHeaderNodes[key]
|
||||
self.itemHeaderNodes.removeValue(forKey: key)
|
||||
ASPerformMainThreadDeallocation(&itemHeaderNode)
|
||||
}
|
||||
|
||||
self.waitingForNodesDisposable.dispose()
|
||||
|
|
@ -446,8 +434,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
self.reorderNode = nil
|
||||
if let itemNode = reorderNode.itemNode, itemNode.supernode == self {
|
||||
self.reorderItemNodeToFront(itemNode)
|
||||
reorderNode.animateCompletion(completion: { [weak itemNode, weak reorderNode] in
|
||||
//itemNode?.isHidden = false
|
||||
reorderNode.animateCompletion(completion: { [weak reorderNode] in
|
||||
reorderNode?.removeFromSupernode()
|
||||
})
|
||||
self.setNeedsAnimations()
|
||||
|
|
@ -545,7 +532,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
}, selector: #selector(ListViewTimerProxy.timerEvent), userInfo: nil, repeats: false)
|
||||
self.flashNodesDelayTimer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
|
||||
self.updateHeaderItemsFlashing(animated: true)
|
||||
}
|
||||
}
|
||||
|
|
@ -568,7 +555,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
}, selector: #selector(ListViewTimerProxy.timerEvent), userInfo: nil, repeats: false)
|
||||
self.flashScrollIndicatorTimer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
|
||||
} else {
|
||||
self.verticalScrollIndicator?.layer.removeAnimation(forKey: "opacity")
|
||||
self.verticalScrollIndicator?.alpha = 1.0
|
||||
|
|
@ -1131,9 +1118,9 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
for itemNode in self.itemNodes {
|
||||
if itemNode.isHighlightedInOverlay {
|
||||
lowestOverlayNode = itemNode
|
||||
itemNode.view.superview?.bringSubview(toFront: itemNode.view)
|
||||
itemNode.view.superview?.bringSubviewToFront(itemNode.view)
|
||||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.view.superview?.bringSubview(toFront: verticalScrollIndicator.view)
|
||||
verticalScrollIndicator.view.superview?.bringSubviewToFront(verticalScrollIndicator.view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1153,18 +1140,18 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
} else if let itemHighlightOverlayBackground = self.itemHighlightOverlayBackground {
|
||||
self.itemHighlightOverlayBackground = nil
|
||||
for (_, headerNode) in self.itemHeaderNodes {
|
||||
for (_, _) in self.itemHeaderNodes {
|
||||
//self.view.bringSubview(toFront: headerNode.view)
|
||||
}
|
||||
//self.view.bringSubview(toFront: itemHighlightOverlayBackground.view)
|
||||
for itemNode in self.itemNodes {
|
||||
for _ in self.itemNodes {
|
||||
//self.view.bringSubview(toFront: itemNode.view)
|
||||
}
|
||||
transition.updateAlpha(node: itemHighlightOverlayBackground, alpha: 0.0, completion: { [weak itemHighlightOverlayBackground] _ in
|
||||
itemHighlightOverlayBackground?.removeFromSupernode()
|
||||
})
|
||||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.view.superview?.bringSubview(toFront: verticalScrollIndicator.view)
|
||||
verticalScrollIndicator.view.superview?.bringSubviewToFront(verticalScrollIndicator.view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1649,12 +1636,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
if let strongSelf = self {
|
||||
strongSelf.replayOperations(animated: animated, animateAlpha: options.contains(.AnimateAlpha), animateCrossfade: options.contains(.AnimateCrossfade), synchronous: options.contains(.Synchronous), animateTopItemVerticalOrigin: options.contains(.AnimateTopItemPosition), operations: updatedOperations, requestItemInsertionAnimationsIndices: options.contains(.RequestItemInsertionAnimations) ? insertedIndexSet : Set(), scrollToItem: scrollToItem, additionalScrollDistance: additionalScrollDistance, updateSizeAndInsets: updateSizeAndInsets, stationaryItemIndex: stationaryItemIndex, updateOpaqueState: updateOpaqueState, completion: {
|
||||
if options.contains(.PreferSynchronousDrawing) {
|
||||
let startTime = CACurrentMediaTime()
|
||||
self?.recursivelyEnsureDisplaySynchronously(true)
|
||||
let deltaTime = CACurrentMediaTime() - startTime
|
||||
if false {
|
||||
print("ListView: waited \(deltaTime * 1000.0) ms for nodes to display")
|
||||
}
|
||||
}
|
||||
completion()
|
||||
})
|
||||
|
|
@ -1665,12 +1647,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
let readyWithTimeout = combineLatest(readySignals)
|
||||
|> deliverOnMainQueue
|
||||
|> timeout(0.2, queue: Queue.mainQueue(), alternate: .single([]))
|
||||
let startTime = CACurrentMediaTime()
|
||||
self.waitingForNodesDisposable.set(readyWithTimeout.start(completed: {
|
||||
let deltaTime = CACurrentMediaTime() - startTime
|
||||
if false {
|
||||
print("ListView: waited \(deltaTime * 1000.0) ms for nodes to load")
|
||||
}
|
||||
beginReplay()
|
||||
}))
|
||||
} else {
|
||||
|
|
@ -2361,9 +2338,9 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
|
||||
if hadInserts, let reorderNode = self.reorderNode, reorderNode.supernode != nil {
|
||||
self.view.bringSubview(toFront: reorderNode.view)
|
||||
self.view.bringSubviewToFront(reorderNode.view)
|
||||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.view.superview?.bringSubview(toFront: verticalScrollIndicator.view)
|
||||
verticalScrollIndicator.view.superview?.bringSubviewToFront(verticalScrollIndicator.view)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2537,7 +2514,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
animationCurve = .easeInOut
|
||||
animationDuration = duration ?? 0.3
|
||||
let basicAnimation = CABasicAnimation(keyPath: "sublayerTransform")
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
basicAnimation.duration = updateSizeAndInsets.duration * UIView.animationDurationFactor()
|
||||
basicAnimation.fromValue = NSValue(caTransform3D: CATransform3DMakeTranslation(0.0, -completeOffset, 0.0))
|
||||
basicAnimation.toValue = NSValue(caTransform3D: CATransform3DIdentity)
|
||||
|
|
@ -2762,7 +2739,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
springAnimation.toValue = NSValue(caTransform3D: CATransform3DIdentity)
|
||||
springAnimation.isRemovedOnCompletion = true
|
||||
springAnimation.isAdditive = true
|
||||
springAnimation.fillMode = kCAFillModeForwards
|
||||
springAnimation.fillMode = CAMediaTimingFillMode.forwards
|
||||
|
||||
let k = Float(UIView.animationDurationFactor())
|
||||
var speed: Float = 1.0
|
||||
|
|
@ -2778,7 +2755,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
reverseSpringAnimation.toValue = NSValue(caTransform3D: CATransform3DIdentity)
|
||||
reverseSpringAnimation.isRemovedOnCompletion = true
|
||||
reverseSpringAnimation.isAdditive = true
|
||||
reverseSpringAnimation.fillMode = kCAFillModeForwards
|
||||
reverseSpringAnimation.fillMode = CAMediaTimingFillMode.forwards
|
||||
|
||||
reverseSpringAnimation.speed = speed * Float(reverseSpringAnimation.duration / duration)
|
||||
|
||||
|
|
@ -2789,7 +2766,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
animationCurve = .easeInOut
|
||||
animationDuration = duration
|
||||
let basicAnimation = CABasicAnimation(keyPath: "sublayerTransform")
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
basicAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
basicAnimation.duration = duration * UIView.animationDurationFactor()
|
||||
basicAnimation.fromValue = NSValue(caTransform3D: CATransform3DMakeTranslation(0.0, -offset, 0.0))
|
||||
basicAnimation.toValue = NSValue(caTransform3D: CATransform3DIdentity)
|
||||
|
|
@ -2797,7 +2774,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
basicAnimation.isAdditive = true
|
||||
|
||||
let reverseBasicAnimation = CABasicAnimation(keyPath: "sublayerTransform")
|
||||
reverseBasicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
reverseBasicAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
reverseBasicAnimation.duration = duration * UIView.animationDurationFactor()
|
||||
reverseBasicAnimation.fromValue = NSValue(caTransform3D: CATransform3DMakeTranslation(0.0, offset, 0.0))
|
||||
reverseBasicAnimation.toValue = NSValue(caTransform3D: CATransform3DIdentity)
|
||||
|
|
@ -2848,17 +2825,6 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.layer.add(reverseAnimation, forKey: nil)
|
||||
}
|
||||
} else {
|
||||
if useBackgroundDeallocation {
|
||||
assertionFailure()
|
||||
/*for itemNode in temporaryPreviousNodes {
|
||||
ASDeallocQueue.sharedDeallocation().releaseObject(inBackground: itemNode)
|
||||
}*/
|
||||
} else {
|
||||
for itemNode in temporaryPreviousNodes {
|
||||
//ASPerformMainThreadDeallocation(itemNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2901,17 +2867,6 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
//print("replayOperations \(delta * 1000.0) ms")
|
||||
}
|
||||
|
||||
for (previousNode, _) in previousApparentFrames {
|
||||
if previousNode.supernode == nil {
|
||||
if useBackgroundDeallocation {
|
||||
assertionFailure()
|
||||
//ASDeallocQueue.sharedDeallocatio.releaseObject(inBackground: previousNode)
|
||||
} else {
|
||||
//ASPerformMainThreadDeallocation(previousNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
completion()
|
||||
}
|
||||
}
|
||||
|
|
@ -2984,7 +2939,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
if transition.1 {
|
||||
headerNode.layer.animateBoundsOriginYAdditive(from: offset, to: 0.0, duration: duration, mediaTimingFunction: ContainedViewLayoutTransitionCurve.slide.mediaTimingFunction)
|
||||
} else {
|
||||
headerNode.layer.animateBoundsOriginYAdditive(from: offset, to: 0.0, duration: duration, mediaTimingFunction: CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut))
|
||||
headerNode.layer.animateBoundsOriginYAdditive(from: offset, to: 0.0, duration: duration, mediaTimingFunction: CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3132,10 +3087,8 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
updatedAccessoryItemNodeOrigin.x += updatedParentOrigin.x
|
||||
updatedAccessoryItemNodeOrigin.y += updatedParentOrigin.y
|
||||
updatedAccessoryItemNodeOrigin.y -= itemNode.bounds.origin.y
|
||||
//updatedAccessoryItemNodeOrigin.y += itemNode.transitionOffset
|
||||
|
||||
var deltaHeight = itemNode.frame.size.height - nextItemNode.frame.size.height
|
||||
//deltaHeight = 0.0
|
||||
let deltaHeight = itemNode.frame.size.height - nextItemNode.frame.size.height
|
||||
nextAccessoryItemNode.animateTransitionOffset(CGPoint(x: 0.0, y: updatedAccessoryItemNodeOrigin.y - previousAccessoryItemNodeOrigin.y - deltaHeight), beginAt: currentTimestamp, duration: insertionAnimationDuration * UIView.animationDurationFactor(), curve: listViewAnimationCurveSystem)
|
||||
|
||||
}
|
||||
|
|
@ -3353,12 +3306,6 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
let node = self.itemNodes[i]
|
||||
if node.index == nil && node.apparentHeight <= CGFloat.ulpOfOne {
|
||||
self.removeItemNodeAtIndex(i)
|
||||
if useBackgroundDeallocation {
|
||||
assertionFailure()
|
||||
//ASDeallocQueue.sharedDeallocation().releaseObject(inBackground: node)
|
||||
} else {
|
||||
//ASPerformMainThreadDeallocation(node)
|
||||
}
|
||||
} else {
|
||||
i += 1
|
||||
}
|
||||
|
|
@ -3653,7 +3600,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
}, selector: #selector(ListViewTimerProxy.timerEvent), userInfo: nil, repeats: false)
|
||||
strongSelf.selectionLongTapDelayTimer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
|
||||
}
|
||||
}
|
||||
break
|
||||
|
|
@ -3664,7 +3611,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
}, selector: #selector(ListViewTimerProxy.timerEvent), userInfo: nil, repeats: false)
|
||||
self.selectionTouchDelayTimer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
|
||||
|
||||
super.touchesBegan(touches, with: event)
|
||||
|
||||
|
|
@ -3909,22 +3856,22 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
}
|
||||
|
||||
private func reorderItemNodeToFront(_ itemNode: ListViewItemNode) {
|
||||
itemNode.view.superview?.bringSubview(toFront: itemNode.view)
|
||||
itemNode.view.superview?.bringSubviewToFront(itemNode.view)
|
||||
if let itemHighlightOverlayBackground = self.itemHighlightOverlayBackground {
|
||||
itemHighlightOverlayBackground.view.superview?.bringSubview(toFront: itemHighlightOverlayBackground.view)
|
||||
itemHighlightOverlayBackground.view.superview?.bringSubviewToFront(itemHighlightOverlayBackground.view)
|
||||
}
|
||||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.view.superview?.bringSubview(toFront: verticalScrollIndicator.view)
|
||||
verticalScrollIndicator.view.superview?.bringSubviewToFront(verticalScrollIndicator.view)
|
||||
}
|
||||
}
|
||||
|
||||
private func reorderHeaderNodeToFront(_ headerNode: ListViewItemHeaderNode) {
|
||||
headerNode.view.superview?.bringSubview(toFront: headerNode.view)
|
||||
headerNode.view.superview?.bringSubviewToFront(headerNode.view)
|
||||
if let itemHighlightOverlayBackground = self.itemHighlightOverlayBackground {
|
||||
itemHighlightOverlayBackground.view.superview?.bringSubview(toFront: itemHighlightOverlayBackground.view)
|
||||
itemHighlightOverlayBackground.view.superview?.bringSubviewToFront(itemHighlightOverlayBackground.view)
|
||||
}
|
||||
if let verticalScrollIndicator = self.verticalScrollIndicator {
|
||||
verticalScrollIndicator.view.superview?.bringSubview(toFront: verticalScrollIndicator.view)
|
||||
verticalScrollIndicator.view.superview?.bringSubviewToFront(verticalScrollIndicator.view)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3966,10 +3913,10 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
|||
if let (_, frame) = accessibilityFocusedNode {
|
||||
for itemNode in self.itemNodes {
|
||||
if frame.intersects(itemNode.frame) {
|
||||
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, itemNode.view)
|
||||
UIAccessibility.post(notification: UIAccessibility.Notification.layoutChanged, argument: itemNode.view)
|
||||
if let index = itemNode.index {
|
||||
let scrollStatus = "Row \(index + 1) of \(self.items.count)"
|
||||
UIAccessibilityPostNotification(UIAccessibilityPageScrolledNotification, scrollStatus)
|
||||
UIAccessibility.post(notification: UIAccessibility.Notification.pageScrolled, argument: scrollStatus)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public let listViewAnimationCurveLinear: (CGFloat) -> CGFloat = { t in
|
|||
}
|
||||
|
||||
#if os(iOS)
|
||||
public func listViewAnimationCurveFromAnimationOptions(animationOptions: UIViewAnimationOptions) -> (CGFloat) -> CGFloat {
|
||||
public func listViewAnimationCurveFromAnimationOptions(animationOptions: UIView.AnimationOptions) -> (CGFloat) -> CGFloat {
|
||||
if animationOptions.rawValue == UInt(7 << 16) {
|
||||
return listViewAnimationCurveSystem
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ private final class WindowRootViewController: UIViewController, UIViewController
|
|||
self.extendedLayoutIncludesOpaqueBars = true
|
||||
|
||||
if #available(iOSApplicationExtension 11.0, *) {
|
||||
self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.UIAccessibilityVoiceOverStatusDidChange, object: nil, queue: OperationQueue.main, using: { [weak self] _ in
|
||||
self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: UIAccessibility.voiceOverStatusDidChangeNotification, object: nil, queue: OperationQueue.main, using: { [weak self] _ in
|
||||
if let strongSelf = self {
|
||||
strongSelf.updatePreviewingRegistration()
|
||||
}
|
||||
|
|
@ -130,11 +130,11 @@ private final class WindowRootViewController: UIViewController, UIViewController
|
|||
}
|
||||
}
|
||||
|
||||
override func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge {
|
||||
override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge {
|
||||
return self.gestureEdges
|
||||
}
|
||||
|
||||
override func prefersHomeIndicatorAutoHidden() -> Bool {
|
||||
override var prefersHomeIndicatorAutoHidden: Bool {
|
||||
return self.preferNavigationUIHidden
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ public class NavigationBackButtonNode: ASControlNode {
|
|||
return UIFont.systemFont(ofSize: 17.0)
|
||||
}
|
||||
|
||||
private func attributesForCurrentState() -> [NSAttributedStringKey : AnyObject] {
|
||||
private func attributesForCurrentState() -> [NSAttributedString.Key : AnyObject] {
|
||||
return [
|
||||
NSAttributedStringKey.font: self.fontForCurrentState(),
|
||||
NSAttributedStringKey.foregroundColor: self.isEnabled ? self.color : self.disabledColor
|
||||
NSAttributedString.Key.font: self.fontForCurrentState(),
|
||||
NSAttributedString.Key.foregroundColor: self.isEnabled ? self.color : self.disabledColor
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ public class NavigationBackButtonNode: ASControlNode {
|
|||
let alpha: CGFloat = !self.isEnabled ? 1.0 : (highlighted ? 0.4 : 1.0)
|
||||
|
||||
if animated {
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIViewAnimationOptions.beginFromCurrentState, animations: { () -> Void in
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIView.AnimationOptions.beginFromCurrentState, animations: { () -> Void in
|
||||
self.alpha = alpha
|
||||
}, completion: nil)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ open class NavigationBar: ASDisplayNode {
|
|||
accessibilityElements.append(self.titleNode)
|
||||
}
|
||||
if let titleView = self.titleView, titleView.superview != nil {
|
||||
titleView.accessibilityFrame = UIAccessibilityConvertFrameToScreenCoordinates(titleView.bounds, titleView)
|
||||
titleView.accessibilityFrame = UIAccessibility.convertToScreenCoordinates(titleView.bounds, in: titleView)
|
||||
accessibilityElements.append(titleView)
|
||||
}
|
||||
if self.rightButtonNode.supernode != nil {
|
||||
|
|
@ -672,7 +672,7 @@ open class NavigationBar: ASDisplayNode {
|
|||
|
||||
self.titleNode = ASTextNode()
|
||||
self.titleNode.isAccessibilityElement = true
|
||||
self.titleNode.accessibilityTraits = UIAccessibilityTraitHeader
|
||||
self.titleNode.accessibilityTraits = .header
|
||||
|
||||
self.backButtonNode = NavigationButtonNode()
|
||||
self.badgeNode = NavigationBarBadgeNode(fillColor: self.presentationData.theme.badgeBackgroundColor, strokeColor: self.presentationData.theme.badgeStrokeColor, textColor: self.presentationData.theme.badgeTextColor)
|
||||
|
|
@ -831,7 +831,7 @@ open class NavigationBar: ASDisplayNode {
|
|||
leftTitleInset += backButtonSize.width + backButtonInset + 1.0
|
||||
|
||||
let topHitTestSlop = (nominalHeight - backButtonSize.height) * 0.5
|
||||
self.backButtonNode.hitTestSlop = UIEdgeInsetsMake(-topHitTestSlop, -27.0, -topHitTestSlop, -8.0)
|
||||
self.backButtonNode.hitTestSlop = UIEdgeInsets(top: -topHitTestSlop, left: -27.0, bottom: -topHitTestSlop, right: -8.0)
|
||||
|
||||
if let transitionState = self.transitionState {
|
||||
let progress = transitionState.progress
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ private final class NavigationButtonItemNode: ASTextNode {
|
|||
return self.bold ? UIFont.boldSystemFont(ofSize: 17.0) : UIFont.systemFont(ofSize: 17.0)
|
||||
}
|
||||
|
||||
private func attributesForCurrentState() -> [NSAttributedStringKey : AnyObject] {
|
||||
private func attributesForCurrentState() -> [NSAttributedString.Key: AnyObject] {
|
||||
return [
|
||||
NSAttributedStringKey.font: self.fontForCurrentState(),
|
||||
NSAttributedStringKey.foregroundColor: self.isEnabled ? self.color : self.disabledColor
|
||||
NSAttributedString.Key.font: self.fontForCurrentState(),
|
||||
NSAttributedString.Key.foregroundColor: self.isEnabled ? self.color : self.disabledColor
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ private final class NavigationButtonItemNode: ASTextNode {
|
|||
self.hitTestSlop = UIEdgeInsets(top: -16.0, left: -10.0, bottom: -16.0, right: -10.0)
|
||||
self.displaysAsynchronously = false
|
||||
|
||||
self.accessibilityTraits = UIAccessibilityTraitButton
|
||||
self.accessibilityTraits = .button
|
||||
}
|
||||
|
||||
func updateLayout(_ constrainedSize: CGSize) -> CGSize {
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
self.controllerView.addSubview(self.controllerView.separatorView)
|
||||
}
|
||||
|
||||
let navigationBackgroundFrame = CGRect(origin: CGPoint(x: masterData.0.maxX, y: 0.0), size: CGSize(width: lastControllerFrameAndLayout.0.width, height: (layout.statusBarHeight ?? 0.0) + 44.0))
|
||||
//let navigationBackgroundFrame = CGRect(origin: CGPoint(x: masterData.0.maxX, y: 0.0), size: CGSize(width: lastControllerFrameAndLayout.0.width, height: (layout.statusBarHeight ?? 0.0) + 44.0))
|
||||
|
||||
if let backgroundDetailsMode = self.backgroundDetailsMode {
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
}
|
||||
}
|
||||
|
||||
if let emptyDetailView = self.controllerView.emptyDetailView {
|
||||
if let _ = self.controllerView.emptyDetailView {
|
||||
// transition.updateFrame(view: navigationBackgroundView, frame: navigationBackgroundFrame)
|
||||
// transition.updateFrame(view: navigationSeparatorView, frame: CGRect(origin: CGPoint(x: navigationBackgroundFrame.minX, y: navigationBackgroundFrame.maxY), size: CGSize(width: navigationBackgroundFrame.width, height: UIScreenPixel)))
|
||||
// if let image = emptyDetailView.image {
|
||||
|
|
@ -796,7 +796,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
|
||||
@objc func panGesture(_ recognizer: UIPanGestureRecognizer) {
|
||||
switch recognizer.state {
|
||||
case UIGestureRecognizerState.began:
|
||||
case .began:
|
||||
guard let layout = self.validLayout else {
|
||||
return
|
||||
}
|
||||
|
|
@ -857,14 +857,14 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
}
|
||||
self.navigationTransitionCoordinator = navigationTransitionCoordinator
|
||||
}
|
||||
case UIGestureRecognizerState.changed:
|
||||
case .changed:
|
||||
if let navigationTransitionCoordinator = self.navigationTransitionCoordinator, !navigationTransitionCoordinator.animatingCompletion {
|
||||
let translation = recognizer.translation(in: self.view).x
|
||||
let progress = max(0.0, min(1.0, translation / self.view.frame.width))
|
||||
navigationTransitionCoordinator.progress = progress
|
||||
|
||||
}
|
||||
case UIGestureRecognizerState.ended:
|
||||
case .ended:
|
||||
if let navigationTransitionCoordinator = self.navigationTransitionCoordinator, !navigationTransitionCoordinator.animatingCompletion {
|
||||
let velocity = recognizer.velocity(in: self.view).x
|
||||
|
||||
|
|
@ -1205,7 +1205,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
if flag {
|
||||
controller.view.frame = strongSelf.view.bounds.offsetBy(dx: 0.0, dy: strongSelf.view.bounds.height)
|
||||
strongSelf.view.addSubview(controller.view)
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIViewAnimationOptions(rawValue: 7 << 16), animations: {
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIView.AnimationOptions(rawValue: 7 << 16), animations: {
|
||||
controller.view.frame = strongSelf.view.bounds
|
||||
}, completion: { _ in
|
||||
if let completion = completion {
|
||||
|
|
@ -1230,7 +1230,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||
override open func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
|
||||
if let controller = self.presentedViewController {
|
||||
if flag {
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIViewAnimationOptions(rawValue: 7 << 16), animations: {
|
||||
UIView.animate(withDuration: 0.3, delay: 0.0, options: UIView.AnimationOptions(rawValue: 7 << 16), animations: {
|
||||
controller.view.frame = self.view.bounds.offsetBy(dx: 0.0, dy: self.view.bounds.height)
|
||||
}, completion: { _ in
|
||||
controller.view.removeFromSuperview()
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ public class NavigationTitleNode: ASDisplayNode {
|
|||
}
|
||||
|
||||
private func setText(_ text: NSString) {
|
||||
var titleAttributes = [NSAttributedStringKey : AnyObject]()
|
||||
titleAttributes[NSAttributedStringKey.font] = UIFont.boldSystemFont(ofSize: 17.0)
|
||||
titleAttributes[NSAttributedStringKey.foregroundColor] = self.color
|
||||
var titleAttributes = [NSAttributedString.Key : AnyObject]()
|
||||
titleAttributes[NSAttributedString.Key.font] = UIFont.boldSystemFont(ofSize: 17.0)
|
||||
titleAttributes[NSAttributedString.Key.foregroundColor] = self.color
|
||||
let titleString = NSAttributedString(string: text as String, attributes: titleAttributes)
|
||||
self.label.attributedText = titleString
|
||||
self.invalidateCalculatedLayout()
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class NavigationTransitionCoordinator {
|
|||
func animateCancel(_ completion: @escaping () -> ()) {
|
||||
self.currentCompletion = completion
|
||||
|
||||
UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions(), animations: { () -> Void in
|
||||
UIView.animate(withDuration: 0.1, delay: 0.0, options: UIView.AnimationOptions(), animations: { () -> Void in
|
||||
self.progress = 0.0
|
||||
}) { (completed) -> Void in
|
||||
switch self.transition {
|
||||
|
|
@ -235,13 +235,13 @@ class NavigationTransitionCoordinator {
|
|||
}
|
||||
|
||||
if abs(velocity) < CGFloat.ulpOfOne && abs(self.progress) < CGFloat.ulpOfOne {
|
||||
UIView.animate(withDuration: 0.5, delay: 0.0, options: UIViewAnimationOptions(rawValue: 7 << 16), animations: {
|
||||
UIView.animate(withDuration: 0.5, delay: 0.0, options: UIView.AnimationOptions(rawValue: 7 << 16), animations: {
|
||||
self.progress = 1.0
|
||||
}, completion: { _ in
|
||||
f()
|
||||
})
|
||||
} else {
|
||||
UIView.animate(withDuration: Double(max(0.05, min(0.2, abs(distance / velocity)))), delay: 0.0, options: UIViewAnimationOptions(), animations: { () -> Void in
|
||||
UIView.animate(withDuration: Double(max(0.05, min(0.2, abs(distance / velocity)))), delay: 0.0, options:UIView.AnimationOptions(), animations: { () -> Void in
|
||||
self.progress = 1.0
|
||||
}) { (completed) -> Void in
|
||||
f()
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ final class PeekControllerMenuItemNode: HighlightTrackingButtonNode {
|
|||
self.highligthedChanged = { [weak self] highlighted in
|
||||
if let strongSelf = self {
|
||||
if highlighted {
|
||||
strongSelf.view.superview?.bringSubview(toFront: strongSelf.view)
|
||||
strongSelf.view.superview?.bringSubviewToFront(strongSelf.view)
|
||||
strongSelf.highlightedBackgroundNode.alpha = 1.0
|
||||
} else {
|
||||
strongSelf.highlightedBackgroundNode.alpha = 0.0
|
||||
|
|
|
|||
|
|
@ -220,14 +220,14 @@ final class PeekControllerNode: ViewControllerTracingNode {
|
|||
self.blurView.layer.animateAlpha(from: self.blurView.alpha, to: 0.0, duration: 0.25, removeOnCompletion: false)
|
||||
|
||||
let offset = CGPoint(x: rect.midX - self.containerNode.position.x, y: rect.midY - self.containerNode.position.y)
|
||||
self.containerNode.layer.animatePosition(from: CGPoint(), to: offset, duration: 0.25, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, additive: true, force: true, completion: { _ in
|
||||
self.containerNode.layer.animatePosition(from: CGPoint(), to: offset, duration: 0.25, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, additive: true, force: true, completion: { _ in
|
||||
completion()
|
||||
})
|
||||
self.containerNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false)
|
||||
self.containerNode.layer.animateScale(from: 1.0, to: 0.1, duration: 0.25, removeOnCompletion: false)
|
||||
|
||||
if let topAccessoryNode = self.topAccessoryNode {
|
||||
topAccessoryNode.layer.animatePosition(from: CGPoint(), to: offset, duration: 0.25, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, additive: true, force: true, completion: { _ in
|
||||
topAccessoryNode.layer.animatePosition(from: CGPoint(), to: offset, duration: 0.25, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, additive: true, force: true, completion: { _ in
|
||||
completion()
|
||||
})
|
||||
topAccessoryNode.layer.animateAlpha(from: topAccessoryNode.alpha, to: 0.0, duration: 0.2, removeOnCompletion: false)
|
||||
|
|
@ -235,7 +235,7 @@ final class PeekControllerNode: ViewControllerTracingNode {
|
|||
}
|
||||
|
||||
if let menuNode = self.menuNode {
|
||||
menuNode.layer.animatePosition(from: menuNode.position, to: CGPoint(x: menuNode.position.x, y: self.bounds.size.height + menuNode.bounds.size.height / 2.0), duration: 0.25, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false)
|
||||
menuNode.layer.animatePosition(from: menuNode.position, to: CGPoint(x: menuNode.position.x, y: self.bounds.size.height + menuNode.bounds.size.height / 2.0), duration: 0.25, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ public struct PresentationSurfaceLevel: RawRepresentable {
|
|||
public init(rawValue: Int32) {
|
||||
self.rawValue = rawValue
|
||||
}
|
||||
|
||||
public static let root = PresentationSurfaceLevel(rawValue: 0)
|
||||
}
|
||||
|
||||
public enum PresentationContextType {
|
||||
|
|
@ -305,7 +307,7 @@ public final class PresentationContext {
|
|||
}
|
||||
|
||||
private func notifyAccessibilityScreenChanged() {
|
||||
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil)
|
||||
UIAccessibility.post(notification: UIAccessibility.Notification.screenChanged, argument: nil)
|
||||
}
|
||||
|
||||
func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
extension CALayer {
|
||||
func addShakeAnimation(amplitude: CGFloat = 3.0, duration: Double = 0.3, count: Int = 4, decay: Bool = false) {
|
||||
public extension CALayer {
|
||||
public func addShakeAnimation(amplitude: CGFloat = 3.0, duration: Double = 0.3, count: Int = 4, decay: Bool = false) {
|
||||
let k = Float(UIView.animationDurationFactor())
|
||||
var speed: Float = 1.0
|
||||
if k != 0 && k != 1 {
|
||||
|
|
@ -178,14 +178,14 @@ public final class StatusBar: ASDisplayNode {
|
|||
|
||||
self.inCallBackgroundNode.layer.backgroundColor = inCallBackgroundColor.cgColor
|
||||
if animated {
|
||||
self.inCallBackgroundNode.layer.animate(from: UIColor.clear.cgColor, to: inCallBackgroundColor.cgColor, keyPath: "backgroundColor", timingFunction: kCAMediaTimingFunctionEaseInEaseOut, duration: 0.3)
|
||||
self.inCallBackgroundNode.layer.animate(from: UIColor.clear.cgColor, to: inCallBackgroundColor.cgColor, keyPath: "backgroundColor", timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, duration: 0.3)
|
||||
}
|
||||
} else {
|
||||
self.inCallLabel.removeFromSupernode()
|
||||
|
||||
self.inCallBackgroundNode.layer.backgroundColor = UIColor.clear.cgColor
|
||||
if animated {
|
||||
self.inCallBackgroundNode.layer.animate(from: inCallBackgroundColor.cgColor, to: UIColor.clear.cgColor, keyPath: "backgroundColor", timingFunction: kCAMediaTimingFunctionEaseInEaseOut, duration: 0.3)
|
||||
self.inCallBackgroundNode.layer.animate(from: inCallBackgroundColor.cgColor, to: UIColor.clear.cgColor, keyPath: "backgroundColor", timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, duration: 0.3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ private func displayHiddenAnimation() -> CAAnimation {
|
|||
let animation = CABasicAnimation(keyPath: "transform.translation.y")
|
||||
animation.fromValue = NSNumber(value: Float(-40.0))
|
||||
animation.toValue = NSNumber(value: Float(-40.0))
|
||||
animation.fillMode = kCAFillModeBoth
|
||||
animation.fillMode = .both
|
||||
animation.duration = 1.0
|
||||
animation.speed = 0.0
|
||||
animation.isAdditive = true
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ private class StatusBarItemNode: ASDisplayNode {
|
|||
|
||||
formatter?.locale = Locale.current
|
||||
if let string = formatter?.string(from: Date()) {
|
||||
let attributedString = NSAttributedString(string: string, attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 12.0), NSAttributedStringKey.foregroundColor: color])
|
||||
let attributedString = NSAttributedString(string: string, attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12.0), NSAttributedString.Key.foregroundColor: color])
|
||||
|
||||
let line = CTLineCreateWithAttributedString(attributedString)
|
||||
|
||||
|
|
@ -482,7 +482,7 @@ class StatusBarProxyNode: ASDisplayNode {
|
|||
self.timer = Timer(timeInterval: 5.0, target: StatusBarProxyNodeTimerTarget { [weak self] in
|
||||
self?.updateItems()
|
||||
}, selector: #selector(StatusBarProxyNodeTimerTarget.tick), userInfo: nil, repeats: true)
|
||||
RunLoop.main.add(self.timer!, forMode: .commonModes)
|
||||
RunLoop.main.add(self.timer!, forMode: .common)
|
||||
} else {
|
||||
self.timer?.invalidate()
|
||||
self.timer = nil
|
||||
|
|
|
|||
|
|
@ -233,10 +233,10 @@ open class TabBarController: ViewController {
|
|||
self.tabBarControllerNode.tabBarNode.selectedIndex = self.selectedIndex
|
||||
|
||||
if let currentController = self.currentController {
|
||||
currentController.willMove(toParentViewController: nil)
|
||||
currentController.willMove(toParent: nil)
|
||||
self.tabBarControllerNode.currentControllerNode = nil
|
||||
currentController.removeFromParentViewController()
|
||||
currentController.didMove(toParentViewController: nil)
|
||||
currentController.removeFromParent()
|
||||
currentController.didMove(toParent: nil)
|
||||
|
||||
self.currentController = nil
|
||||
}
|
||||
|
|
@ -247,11 +247,11 @@ open class TabBarController: ViewController {
|
|||
|
||||
var displayNavigationBar = false
|
||||
if let currentController = self.currentController {
|
||||
currentController.willMove(toParentViewController: self)
|
||||
currentController.willMove(toParent: self)
|
||||
self.tabBarControllerNode.currentControllerNode = currentController.displayNode
|
||||
currentController.navigationBar?.isHidden = true
|
||||
self.addChildViewController(currentController)
|
||||
currentController.didMove(toParentViewController: self)
|
||||
self.addChild(currentController)
|
||||
currentController.didMove(toParent: self)
|
||||
|
||||
currentController.navigationBar?.layoutSuspended = true
|
||||
currentController.navigationItem.setTarget(self.navigationItem)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import DisplayPrivate
|
|||
private let separatorHeight: CGFloat = 1.0 / UIScreen.main.scale
|
||||
private func tabBarItemImage(_ image: UIImage?, title: String, backgroundColor: UIColor, tintColor: UIColor, horizontal: Bool, imageMode: Bool) -> (UIImage, CGFloat) {
|
||||
let font = horizontal ? Font.regular(13.0) : Font.medium(10.0)
|
||||
let titleSize = (title as NSString).boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin], attributes: [NSAttributedStringKey.font: font], context: nil).size
|
||||
let titleSize = (title as NSString).boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font: font], context: nil).size
|
||||
|
||||
let imageSize: CGSize
|
||||
if let image = image {
|
||||
|
|
@ -76,9 +76,9 @@ private func tabBarItemImage(_ image: UIImage?, title: String, backgroundColor:
|
|||
|
||||
if !imageMode {
|
||||
if horizontal {
|
||||
(title as NSString).draw(at: CGPoint(x: imageSize.width + horizontalSpacing, y: floor((size.height - titleSize.height) / 2.0) - 2.0), withAttributes: [NSAttributedStringKey.font: font, NSAttributedStringKey.foregroundColor: tintColor])
|
||||
(title as NSString).draw(at: CGPoint(x: imageSize.width + horizontalSpacing, y: floor((size.height - titleSize.height) / 2.0) - 2.0), withAttributes: [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: tintColor])
|
||||
} else {
|
||||
(title as NSString).draw(at: CGPoint(x: floorToScreenPixels((size.width - titleSize.width) / 2.0), y: size.height - titleSize.height - 2.0), withAttributes: [NSAttributedStringKey.font: font, NSAttributedStringKey.foregroundColor: tintColor])
|
||||
(title as NSString).draw(at: CGPoint(x: floorToScreenPixels((size.width - titleSize.width) / 2.0), y: size.height - titleSize.height - 2.0), withAttributes: [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: tintColor])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ private final class TabBarNodeContainer {
|
|||
|
||||
self.imageNode = imageNode
|
||||
self.imageNode.isAccessibilityElement = true
|
||||
self.imageNode.accessibilityTraits = UIAccessibilityTraitButton
|
||||
self.imageNode.accessibilityTraits = .button
|
||||
|
||||
self.badgeContainerNode = ASDisplayNode()
|
||||
self.badgeContainerNode.isUserInteractionEnabled = false
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@ private class TapLongTapOrDoubleTapGestureRecognizerTimerTarget: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
enum TapLongTapOrDoubleTapGesture {
|
||||
public enum TapLongTapOrDoubleTapGesture {
|
||||
case tap
|
||||
case doubleTap
|
||||
case longTap
|
||||
case hold
|
||||
}
|
||||
|
||||
enum TapLongTapOrDoubleTapGestureRecognizerAction {
|
||||
public enum TapLongTapOrDoubleTapGestureRecognizerAction {
|
||||
case waitForDoubleTap
|
||||
case waitForSingleTap
|
||||
case waitForHold(timeout: Double, acceptTap: Bool)
|
||||
|
|
@ -44,12 +44,12 @@ public final class TapLongTapOrDoubleTapGestureRecognizer: UIGestureRecognizer,
|
|||
private var tapCount: Int = 0
|
||||
|
||||
private var timer: Foundation.Timer?
|
||||
private(set) var lastRecognizedGestureAndLocation: (TapLongTapOrDoubleTapGesture, CGPoint)?
|
||||
public private(set) var lastRecognizedGestureAndLocation: (TapLongTapOrDoubleTapGesture, CGPoint)?
|
||||
|
||||
var tapActionAtPoint: ((CGPoint) -> TapLongTapOrDoubleTapGestureRecognizerAction)?
|
||||
var highlight: ((CGPoint?) -> Void)?
|
||||
public var tapActionAtPoint: ((CGPoint) -> TapLongTapOrDoubleTapGestureRecognizerAction)?
|
||||
public var highlight: ((CGPoint?) -> Void)?
|
||||
|
||||
var hapticFeedback: HapticFeedback?
|
||||
public var hapticFeedback: HapticFeedback?
|
||||
|
||||
private var highlightPoint: CGPoint?
|
||||
|
||||
|
|
@ -156,13 +156,13 @@ public final class TapLongTapOrDoubleTapGestureRecognizer: UIGestureRecognizer,
|
|||
self.timer?.invalidate()
|
||||
let timer = Timer(timeInterval: 0.3, target: TapLongTapOrDoubleTapGestureRecognizerTimerTarget(target: self), selector: #selector(TapLongTapOrDoubleTapGestureRecognizerTimerTarget.longTapEvent), userInfo: nil, repeats: false)
|
||||
self.timer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
case let .waitForHold(timeout, _):
|
||||
self.hapticFeedback = HapticFeedback()
|
||||
self.hapticFeedback?.prepareTap()
|
||||
let timer = Timer(timeInterval: timeout, target: TapLongTapOrDoubleTapGestureRecognizerTimerTarget(target: self), selector: #selector(TapLongTapOrDoubleTapGestureRecognizerTimerTarget.holdEvent), userInfo: nil, repeats: false)
|
||||
self.timer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
case .fail:
|
||||
self.state = .failed
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ public final class TapLongTapOrDoubleTapGestureRecognizer: UIGestureRecognizer,
|
|||
self.state = .began
|
||||
let timer = Timer(timeInterval: 0.2, target: TapLongTapOrDoubleTapGestureRecognizerTimerTarget(target: self), selector: #selector(TapLongTapOrDoubleTapGestureRecognizerTimerTarget.tapEvent), userInfo: nil, repeats: false)
|
||||
self.timer = timer
|
||||
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
case let .waitForHold(_, acceptTap):
|
||||
if let (touchLocation, _) = self.touchLocationAndTimestamp, acceptTap {
|
||||
if self.state != .began {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public final class TextAlertContentNode: AlertContentNode {
|
|||
|
||||
private var validLayout: CGSize?
|
||||
|
||||
public var textAttributeAction: (NSAttributedStringKey, (Any) -> Void)? {
|
||||
public var textAttributeAction: (NSAttributedString.Key, (Any) -> Void)? {
|
||||
didSet {
|
||||
if let (attribute, textAttributeAction) = self.textAttributeAction {
|
||||
self.textNode.highlightAttributeAction = { attributes in
|
||||
|
|
@ -218,12 +218,12 @@ public final class TextAlertContentNode: AlertContentNode {
|
|||
|
||||
if let titleNode = self.titleNode, let attributedText = titleNode.attributedText {
|
||||
let updatedText = NSMutableAttributedString(attributedString: attributedText)
|
||||
updatedText.addAttribute(NSAttributedStringKey.foregroundColor, value: theme.primaryColor, range: NSRange(location: 0, length: updatedText.length))
|
||||
updatedText.addAttribute(NSAttributedString.Key.foregroundColor, value: theme.primaryColor, range: NSRange(location: 0, length: updatedText.length))
|
||||
titleNode.attributedText = updatedText
|
||||
}
|
||||
if let attributedText = self.textNode.attributedText {
|
||||
let updatedText = NSMutableAttributedString(attributedString: attributedText)
|
||||
updatedText.addAttribute(NSAttributedStringKey.foregroundColor, value: theme.primaryColor, range: NSRange(location: 0, length: updatedText.length))
|
||||
updatedText.addAttribute(NSAttributedString.Key.foregroundColor, value: theme.primaryColor, range: NSRange(location: 0, length: updatedText.length))
|
||||
self.textNode.attributedText = updatedText
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ public final class TextNodeLayout: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
public func attributesAtPoint(_ point: CGPoint) -> (Int, [NSAttributedStringKey: Any])? {
|
||||
public func attributesAtPoint(_ point: CGPoint) -> (Int, [NSAttributedString.Key: Any])? {
|
||||
if let attributedString = self.attributedString {
|
||||
let transformedPoint = CGPoint(x: point.x - self.insets.left, y: point.y - self.insets.top)
|
||||
var lineIndex = -1
|
||||
|
|
@ -336,7 +336,7 @@ public final class TextNodeLayout: NSObject {
|
|||
public func attributeSubstring(name: String, index: Int) -> String? {
|
||||
if let attributedString = self.attributedString {
|
||||
var range = NSRange()
|
||||
let _ = attributedString.attribute(NSAttributedStringKey(rawValue: name), at: index, effectiveRange: &range)
|
||||
let _ = attributedString.attribute(NSAttributedString.Key(rawValue: name), at: index, effectiveRange: &range)
|
||||
if range.length != 0 {
|
||||
return (attributedString.string as NSString).substring(with: range)
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ public final class TextNodeLayout: NSObject {
|
|||
return []
|
||||
}
|
||||
var result: [(Any, CGRect)] = []
|
||||
attributedString.enumerateAttribute(NSAttributedStringKey(rawValue: name), in: NSRange(location: 0, length: attributedString.length), options: []) { (value, range, _) in
|
||||
attributedString.enumerateAttribute(NSAttributedString.Key(rawValue: name), in: NSRange(location: 0, length: attributedString.length), options: []) { (value, range, _) in
|
||||
if let value = value, range.length != 0 {
|
||||
var coveringRect = CGRect()
|
||||
for line in self.lines {
|
||||
|
|
@ -390,7 +390,7 @@ public final class TextNodeLayout: NSObject {
|
|||
public func lineAndAttributeRects(name: String, at index: Int) -> [(CGRect, CGRect)]? {
|
||||
if let attributedString = self.attributedString {
|
||||
var range = NSRange()
|
||||
let _ = attributedString.attribute(NSAttributedStringKey(rawValue: name), at: index, effectiveRange: &range)
|
||||
let _ = attributedString.attribute(NSAttributedString.Key(rawValue: name), at: index, effectiveRange: &range)
|
||||
if range.length != 0 {
|
||||
var rects: [(CGRect, CGRect)] = []
|
||||
for line in self.lines {
|
||||
|
|
@ -468,7 +468,7 @@ private final class TextAccessibilityOverlayNodeView: UIView {
|
|||
let element = AccessibilityAreaNode()
|
||||
element.accessibilityLabel = value as? String ?? ""
|
||||
element.frame = rect
|
||||
element.accessibilityTraits = UIAccessibilityTraitLink
|
||||
element.accessibilityTraits = .link
|
||||
element.activate = { [weak self] in
|
||||
self?.openUrl(value as? String ?? "")
|
||||
return true
|
||||
|
|
@ -543,7 +543,7 @@ public class TextNode: ASDisplayNode {
|
|||
self.clipsToBounds = false
|
||||
}
|
||||
|
||||
public func attributesAtPoint(_ point: CGPoint) -> (Int, [NSAttributedStringKey: Any])? {
|
||||
public func attributesAtPoint(_ point: CGPoint) -> (Int, [NSAttributedString.Key: Any])? {
|
||||
if let cachedLayout = self.cachedLayout {
|
||||
return cachedLayout.attributesAtPoint(point)
|
||||
} else {
|
||||
|
|
@ -581,7 +581,7 @@ public class TextNode: ASDisplayNode {
|
|||
|
||||
let font: CTFont
|
||||
if stringLength != 0 {
|
||||
if let stringFont = attributedString.attribute(NSAttributedStringKey.font, at: 0, effectiveRange: nil) {
|
||||
if let stringFont = attributedString.attribute(NSAttributedString.Key.font, at: 0, effectiveRange: nil) {
|
||||
font = stringFont as! CTFont
|
||||
} else {
|
||||
font = defaultFont
|
||||
|
|
@ -686,9 +686,9 @@ public class TextNode: ASDisplayNode {
|
|||
if CTLineGetTypographicBounds(originalLine, nil, nil, nil) - CTLineGetTrailingWhitespaceWidth(originalLine) < Double(constrainedSize.width) {
|
||||
coreTextLine = originalLine
|
||||
} else {
|
||||
var truncationTokenAttributes: [NSAttributedStringKey : AnyObject] = [:]
|
||||
truncationTokenAttributes[NSAttributedStringKey.font] = font
|
||||
truncationTokenAttributes[NSAttributedStringKey(rawValue: kCTForegroundColorFromContextAttributeName as String)] = true as NSNumber
|
||||
var truncationTokenAttributes: [NSAttributedString.Key : AnyObject] = [:]
|
||||
truncationTokenAttributes[NSAttributedString.Key.font] = font
|
||||
truncationTokenAttributes[NSAttributedString.Key(rawValue: kCTForegroundColorFromContextAttributeName as String)] = true as NSNumber
|
||||
let tokenString = "\u{2026}"
|
||||
let truncatedTokenString = NSAttributedString(string: tokenString, attributes: truncationTokenAttributes)
|
||||
let truncationToken = CTLineCreateWithAttributedString(truncatedTokenString)
|
||||
|
|
@ -699,12 +699,12 @@ public class TextNode: ASDisplayNode {
|
|||
|
||||
var headIndent: CGFloat = 0.0
|
||||
attributedString.enumerateAttributes(in: NSMakeRange(lineRange.location, lineRange.length), options: []) { attributes, range, _ in
|
||||
if let _ = attributes[NSAttributedStringKey.strikethroughStyle] {
|
||||
if let _ = attributes[NSAttributedString.Key.strikethroughStyle] {
|
||||
let lowerX = floor(CTLineGetOffsetForStringIndex(coreTextLine, range.location, nil))
|
||||
let upperX = ceil(CTLineGetOffsetForStringIndex(coreTextLine, range.location + range.length, nil))
|
||||
let x = lowerX < upperX ? lowerX : upperX
|
||||
strikethroughs.append(TextNodeStrikethrough(frame: CGRect(x: x, y: 0.0, width: abs(upperX - lowerX), height: fontLineHeight)))
|
||||
} else if let paragraphStyle = attributes[NSAttributedStringKey.paragraphStyle] as? NSParagraphStyle {
|
||||
} else if let paragraphStyle = attributes[NSAttributedString.Key.paragraphStyle] as? NSParagraphStyle {
|
||||
headIndent = paragraphStyle.headIndent
|
||||
|
||||
}
|
||||
|
|
@ -744,12 +744,12 @@ public class TextNode: ASDisplayNode {
|
|||
|
||||
var headIndent: CGFloat = 0.0
|
||||
attributedString.enumerateAttributes(in: NSMakeRange(lineRange.location, lineRange.length), options: []) { attributes, range, _ in
|
||||
if let _ = attributes[NSAttributedStringKey.strikethroughStyle] {
|
||||
if let _ = attributes[NSAttributedString.Key.strikethroughStyle] {
|
||||
let lowerX = floor(CTLineGetOffsetForStringIndex(coreTextLine, range.location, nil))
|
||||
let upperX = ceil(CTLineGetOffsetForStringIndex(coreTextLine, range.location + range.length, nil))
|
||||
let x = lowerX < upperX ? lowerX : upperX
|
||||
strikethroughs.append(TextNodeStrikethrough(frame: CGRect(x: x, y: 0.0, width: abs(upperX - lowerX), height: fontLineHeight)))
|
||||
} else if let paragraphStyle = attributes[NSAttributedStringKey.paragraphStyle] as? NSParagraphStyle {
|
||||
} else if let paragraphStyle = attributes[NSAttributedString.Key.paragraphStyle] as? NSParagraphStyle {
|
||||
headIndent = paragraphStyle.headIndent
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ open class UITracingLayerView: UIView {
|
|||
self.setNeedsLayout()
|
||||
}
|
||||
|
||||
override open var autoresizingMask: UIViewAutoresizing {
|
||||
override open var autoresizingMask: UIView.AutoresizingMask {
|
||||
get {
|
||||
return []
|
||||
} set(value) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ class UniversalTapRecognizer: UITapGestureRecognizer {
|
|||
}
|
||||
}), selector: #selector(TimerTargetWrapper.timerEvent), userInfo: nil, repeats: false)
|
||||
self.timer = timer
|
||||
RunLoop.main.add(timer, forMode: .commonModes)
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ open class ViewControllerPresentationArguments {
|
|||
}
|
||||
}
|
||||
|
||||
override open func prefersHomeIndicatorAutoHidden() -> Bool {
|
||||
override open var prefersHomeIndicatorAutoHidden: Bool {
|
||||
return self.preferNavigationUIHidden
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -446,9 +446,9 @@ public class Window1 {
|
|||
self.presentationContext.containerLayoutUpdated(containedLayoutForWindowLayout(self.windowLayout, hasOnScreenNavigation: self.hostView.hasOnScreenNavigation), transition: .immediate)
|
||||
self.overlayPresentationContext.containerLayoutUpdated(containedLayoutForWindowLayout(self.windowLayout, hasOnScreenNavigation: self.hostView.hasOnScreenNavigation), transition: .immediate)
|
||||
|
||||
self.statusBarChangeObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationWillChangeStatusBarFrame, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
|
||||
self.statusBarChangeObserver = NotificationCenter.default.addObserver(forName: UIApplication.willChangeStatusBarFrameNotification, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
|
||||
if let strongSelf = self {
|
||||
let statusBarHeight: CGFloat = max(20.0, (notification.userInfo?[UIApplicationStatusBarFrameUserInfoKey] as? NSValue)?.cgRectValue.height ?? 20.0)
|
||||
let statusBarHeight: CGFloat = max(20.0, (notification.userInfo?[UIApplication.statusBarFrameUserInfoKey] as? NSValue)?.cgRectValue.height ?? 20.0)
|
||||
|
||||
let transition: ContainedViewLayoutTransition = .animated(duration: 0.35, curve: .easeInOut)
|
||||
strongSelf.updateLayout { $0.update(statusBarHeight: statusBarHeight, transition: transition, overrideTransition: false) }
|
||||
|
|
@ -460,11 +460,11 @@ public class Window1 {
|
|||
return
|
||||
}
|
||||
let keyboardHeight = max(0.0, strongSelf.keyboardManager?.getCurrentKeyboardHeight() ?? 0.0)
|
||||
var duration: Double = (notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0.0
|
||||
var duration: Double = (notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0.0
|
||||
if duration > Double.ulpOfOne {
|
||||
duration = 0.5
|
||||
}
|
||||
let curve: UInt = (notification.userInfo?[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber)?.uintValue ?? 7
|
||||
let curve: UInt = (notification.userInfo?[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber)?.uintValue ?? 7
|
||||
|
||||
let transitionCurve: ContainedViewLayoutTransitionCurve
|
||||
if curve == 7 {
|
||||
|
|
@ -477,9 +477,9 @@ public class Window1 {
|
|||
}
|
||||
})
|
||||
|
||||
self.keyboardFrameChangeObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil, queue: nil, using: { [weak self] notification in
|
||||
self.keyboardFrameChangeObserver = NotificationCenter.default.addObserver(forName: UIResponder.keyboardWillChangeFrameNotification, object: nil, queue: nil, using: { [weak self] notification in
|
||||
if let strongSelf = self {
|
||||
let keyboardFrame: CGRect = (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue ?? CGRect()
|
||||
let keyboardFrame: CGRect = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue ?? CGRect()
|
||||
|
||||
let screenHeight: CGFloat
|
||||
|
||||
|
|
@ -494,11 +494,11 @@ public class Window1 {
|
|||
}
|
||||
|
||||
let keyboardHeight = max(0.0, screenHeight - keyboardFrame.minY)
|
||||
var duration: Double = (notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0.0
|
||||
var duration: Double = (notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0.0
|
||||
if duration > Double.ulpOfOne {
|
||||
duration = 0.5
|
||||
}
|
||||
let curve: UInt = (notification.userInfo?[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber)?.uintValue ?? 7
|
||||
let curve: UInt = (notification.userInfo?[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber)?.uintValue ?? 7
|
||||
|
||||
let transitionCurve: ContainedViewLayoutTransitionCurve
|
||||
if curve == 7 {
|
||||
|
|
@ -512,7 +512,7 @@ public class Window1 {
|
|||
})
|
||||
|
||||
if #available(iOSApplicationExtension 11.0, *) {
|
||||
self.keyboardTypeChangeObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.UITextInputCurrentInputModeDidChange, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
|
||||
self.keyboardTypeChangeObserver = NotificationCenter.default.addObserver(forName: UITextInputMode.currentInputModeDidChangeNotification, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
|
||||
if let strongSelf = self, let initialInputHeight = strongSelf.windowLayout.inputHeight, let firstResponder = getFirstResponderAndAccessoryHeight(strongSelf.hostView.eventView).0 {
|
||||
if firstResponder.textInputMode?.primaryLanguage != nil {
|
||||
return
|
||||
|
|
@ -540,7 +540,7 @@ public class Window1 {
|
|||
}
|
||||
|
||||
if #available(iOSApplicationExtension 11.0, *) {
|
||||
self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.UIAccessibilityVoiceOverStatusDidChange, object: nil, queue: OperationQueue.main, using: { [weak self] _ in
|
||||
self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: UIAccessibility.voiceOverStatusDidChangeNotification, object: nil, queue: OperationQueue.main, using: { [weak self] _ in
|
||||
if let strongSelf = self {
|
||||
strongSelf.updateLayout { $0.update(inVoiceOver: UIAccessibility.isVoiceOverRunning) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@
|
|||
D05CC3251B695B0700E235A3 /* NavigationBarProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = D05CC3231B695B0700E235A3 /* NavigationBarProxy.m */; };
|
||||
D05CC3271B69725400E235A3 /* NavigationBackArrowLight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D05CC3261B69725400E235A3 /* NavigationBackArrowLight@2x.png */; };
|
||||
D05CC3291B69750D00E235A3 /* InteractiveTransitionGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D05CC3281B69750D00E235A3 /* InteractiveTransitionGestureRecognizer.swift */; };
|
||||
D060185F22F35E7400796784 /* ShakeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060185E22F35E7400796784 /* ShakeAnimation.swift */; };
|
||||
D06B76DB20592A97006E9EEA /* LayoutSizes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06B76DA20592A97006E9EEA /* LayoutSizes.swift */; };
|
||||
D06D37A220779C82009219B6 /* VolumeControlStatusBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06D37A120779C82009219B6 /* VolumeControlStatusBar.swift */; };
|
||||
D06EE8451B7140FF00837186 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06EE8441B7140FF00837186 /* Font.swift */; };
|
||||
|
|
@ -281,6 +282,7 @@
|
|||
D05CC3231B695B0700E235A3 /* NavigationBarProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavigationBarProxy.m; sourceTree = "<group>"; };
|
||||
D05CC3261B69725400E235A3 /* NavigationBackArrowLight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "NavigationBackArrowLight@2x.png"; sourceTree = "<group>"; };
|
||||
D05CC3281B69750D00E235A3 /* InteractiveTransitionGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InteractiveTransitionGestureRecognizer.swift; sourceTree = "<group>"; };
|
||||
D060185E22F35E7400796784 /* ShakeAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShakeAnimation.swift; sourceTree = "<group>"; };
|
||||
D06B76DA20592A97006E9EEA /* LayoutSizes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutSizes.swift; sourceTree = "<group>"; };
|
||||
D06D37A120779C82009219B6 /* VolumeControlStatusBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VolumeControlStatusBar.swift; sourceTree = "<group>"; };
|
||||
D06EE8441B7140FF00837186 /* Font.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Font.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -586,6 +588,7 @@
|
|||
D05CC3001B6955D500E235A3 /* Utils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060185E22F35E7400796784 /* ShakeAnimation.swift */,
|
||||
D0750C7522B2934800BE5F6E /* ImageNode.swift */,
|
||||
D0750C7222B2931900BE5F6E /* TransformImageArguments.swift */,
|
||||
D0750C7122B2931900BE5F6E /* TransformImageNode.swift */,
|
||||
|
|
@ -985,6 +988,7 @@
|
|||
D03AA4DD202DB1840056C405 /* PeekControllerGestureRecognizer.swift in Sources */,
|
||||
D007019A2029CAE2006B9E34 /* TooltipControllerNode.swift in Sources */,
|
||||
D05CC3291B69750D00E235A3 /* InteractiveTransitionGestureRecognizer.swift in Sources */,
|
||||
D060185F22F35E7400796784 /* ShakeAnimation.swift in Sources */,
|
||||
D077B8E91F4637040046D27A /* NavigationBarBadge.swift in Sources */,
|
||||
D0CE67921F7DA11700FFB557 /* ActionSheetTheme.swift in Sources */,
|
||||
D0A134642034DE580059716A /* TabBarTapRecognizer.swift in Sources */,
|
||||
|
|
@ -1108,7 +1112,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = DebugFork;
|
||||
};
|
||||
|
|
@ -1240,7 +1244,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
|
|
@ -1269,7 +1273,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = ReleaseHockeyapp;
|
||||
};
|
||||
|
|
@ -1370,7 +1374,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = DebugAppStore;
|
||||
};
|
||||
|
|
@ -1452,7 +1456,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = ReleaseAppStore;
|
||||
};
|
||||
|
|
@ -1534,7 +1538,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
|
|
@ -1624,7 +1628,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
|
|
@ -1706,7 +1710,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_REFLECTION_METADATA_LEVEL = none;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
|
|
|
|||
22
submodules/ItemListUI/Info.plist
Normal file
22
submodules/ItemListUI/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
675
submodules/ItemListUI/ItemListUI_Xcode.xcodeproj/project.pbxproj
Normal file
675
submodules/ItemListUI/ItemListUI_Xcode.xcodeproj/project.pbxproj
Normal file
|
|
@ -0,0 +1,675 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D060182122F35C2300796784 /* ProgressNavigationButtonNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060182022F35C2300796784 /* ProgressNavigationButtonNode.framework */; };
|
||||
D060185322F35E1F00796784 /* ItemListMultilineInputItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184922F35E1E00796784 /* ItemListMultilineInputItem.swift */; };
|
||||
D060185422F35E1F00796784 /* ItemListTextWithLabelItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184A22F35E1E00796784 /* ItemListTextWithLabelItem.swift */; };
|
||||
D060185522F35E1F00796784 /* ItemListActivityTextItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184B22F35E1E00796784 /* ItemListActivityTextItem.swift */; };
|
||||
D060185622F35E1F00796784 /* ItemListActionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184C22F35E1E00796784 /* ItemListActionItem.swift */; };
|
||||
D060185722F35E1F00796784 /* ItemListSwitchItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184D22F35E1E00796784 /* ItemListSwitchItem.swift */; };
|
||||
D060185822F35E1F00796784 /* ItemListLoadingIndicatorEmptyStateItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184E22F35E1E00796784 /* ItemListLoadingIndicatorEmptyStateItem.swift */; };
|
||||
D060185922F35E1F00796784 /* ItemListEditableItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060184F22F35E1E00796784 /* ItemListEditableItem.swift */; };
|
||||
D060185A22F35E1F00796784 /* ItemListDisclosureItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060185022F35E1E00796784 /* ItemListDisclosureItem.swift */; };
|
||||
D060185B22F35E1F00796784 /* ItemListMultilineTextItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060185122F35E1E00796784 /* ItemListMultilineTextItem.swift */; };
|
||||
D060185C22F35E1F00796784 /* ItemListCheckboxItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060185222F35E1F00796784 /* ItemListCheckboxItem.swift */; };
|
||||
D060186122F35F6C00796784 /* ItemListRevealOptionsNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060186022F35F6B00796784 /* ItemListRevealOptionsNode.swift */; };
|
||||
D06018A022F3618B00796784 /* SwitchNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060189F22F3618B00796784 /* SwitchNode.framework */; };
|
||||
D06018A222F3619000796784 /* AnimationUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018A122F3619000796784 /* AnimationUI.framework */; };
|
||||
D06018BB22F3663900796784 /* ItemListEditableReorderControlNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018B822F3663800796784 /* ItemListEditableReorderControlNode.swift */; };
|
||||
D06018BC22F3663900796784 /* ItemListSelectableControlNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018B922F3663800796784 /* ItemListSelectableControlNode.swift */; };
|
||||
D06018BD22F3663900796784 /* ItemListEditableDeleteControlNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018BA22F3663900796784 /* ItemListEditableDeleteControlNode.swift */; };
|
||||
D06018E322F366F200796784 /* CheckNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E222F366F200796784 /* CheckNode.framework */; };
|
||||
D0D3282422F3205E00D07EE2 /* ItemListUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3282222F3205E00D07EE2 /* ItemListUI.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0D3286522F3366600D07EE2 /* ItemListControllerEmptyStateItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3286022F3366500D07EE2 /* ItemListControllerEmptyStateItem.swift */; };
|
||||
D0D3286622F3366600D07EE2 /* ItemListControllerSegmentedTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3286122F3366500D07EE2 /* ItemListControllerSegmentedTitleView.swift */; };
|
||||
D0D3286722F3366600D07EE2 /* ItemListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3286222F3366500D07EE2 /* ItemListController.swift */; };
|
||||
D0D3286822F3366600D07EE2 /* ItemListControllerSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3286322F3366500D07EE2 /* ItemListControllerSearch.swift */; };
|
||||
D0D3286922F3366600D07EE2 /* ItemListControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3286422F3366500D07EE2 /* ItemListControllerNode.swift */; };
|
||||
D0D3286C22F3367300D07EE2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3286B22F3367300D07EE2 /* UIKit.framework */; };
|
||||
D0D3286E22F3367700D07EE2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3286D22F3367700D07EE2 /* Foundation.framework */; };
|
||||
D0D3287022F3367D00D07EE2 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3286F22F3367D00D07EE2 /* AsyncDisplayKit.framework */; };
|
||||
D0D3287222F3368300D07EE2 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3287122F3368300D07EE2 /* Display.framework */; };
|
||||
D0D3287422F3368C00D07EE2 /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3287322F3368C00D07EE2 /* AccountContext.framework */; };
|
||||
D0D3287622F3369200D07EE2 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3287522F3369200D07EE2 /* TelegramPresentationData.framework */; };
|
||||
D0D3289822F3449800D07EE2 /* MergeLists.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3289722F3449800D07EE2 /* MergeLists.framework */; };
|
||||
D0D3289A22F345C500D07EE2 /* ItemListItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3289922F345C500D07EE2 /* ItemListItem.swift */; };
|
||||
D0D328A522F346C200D07EE2 /* ItemListTextItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D328A422F346C200D07EE2 /* ItemListTextItem.swift */; };
|
||||
D0D328DE22F34A0D00D07EE2 /* TextFormat.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D328DD22F34A0D00D07EE2 /* TextFormat.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D060182022F35C2300796784 /* ProgressNavigationButtonNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ProgressNavigationButtonNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060184922F35E1E00796784 /* ItemListMultilineInputItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListMultilineInputItem.swift; sourceTree = "<group>"; };
|
||||
D060184A22F35E1E00796784 /* ItemListTextWithLabelItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListTextWithLabelItem.swift; sourceTree = "<group>"; };
|
||||
D060184B22F35E1E00796784 /* ItemListActivityTextItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListActivityTextItem.swift; sourceTree = "<group>"; };
|
||||
D060184C22F35E1E00796784 /* ItemListActionItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListActionItem.swift; sourceTree = "<group>"; };
|
||||
D060184D22F35E1E00796784 /* ItemListSwitchItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListSwitchItem.swift; sourceTree = "<group>"; };
|
||||
D060184E22F35E1E00796784 /* ItemListLoadingIndicatorEmptyStateItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListLoadingIndicatorEmptyStateItem.swift; sourceTree = "<group>"; };
|
||||
D060184F22F35E1E00796784 /* ItemListEditableItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListEditableItem.swift; sourceTree = "<group>"; };
|
||||
D060185022F35E1E00796784 /* ItemListDisclosureItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListDisclosureItem.swift; sourceTree = "<group>"; };
|
||||
D060185122F35E1E00796784 /* ItemListMultilineTextItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListMultilineTextItem.swift; sourceTree = "<group>"; };
|
||||
D060185222F35E1F00796784 /* ItemListCheckboxItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListCheckboxItem.swift; sourceTree = "<group>"; };
|
||||
D060186022F35F6B00796784 /* ItemListRevealOptionsNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListRevealOptionsNode.swift; sourceTree = "<group>"; };
|
||||
D060189F22F3618B00796784 /* SwitchNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwitchNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018A122F3619000796784 /* AnimationUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AnimationUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06018B822F3663800796784 /* ItemListEditableReorderControlNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListEditableReorderControlNode.swift; sourceTree = "<group>"; };
|
||||
D06018B922F3663800796784 /* ItemListSelectableControlNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListSelectableControlNode.swift; sourceTree = "<group>"; };
|
||||
D06018BA22F3663900796784 /* ItemListEditableDeleteControlNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListEditableDeleteControlNode.swift; sourceTree = "<group>"; };
|
||||
D06018E222F366F200796784 /* CheckNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CheckNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3281F22F3205E00D07EE2 /* ItemListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ItemListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3282222F3205E00D07EE2 /* ItemListUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ItemListUI.h; sourceTree = "<group>"; };
|
||||
D0D3282322F3205E00D07EE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D0D3286022F3366500D07EE2 /* ItemListControllerEmptyStateItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListControllerEmptyStateItem.swift; sourceTree = "<group>"; };
|
||||
D0D3286122F3366500D07EE2 /* ItemListControllerSegmentedTitleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListControllerSegmentedTitleView.swift; sourceTree = "<group>"; };
|
||||
D0D3286222F3366500D07EE2 /* ItemListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListController.swift; sourceTree = "<group>"; };
|
||||
D0D3286322F3366500D07EE2 /* ItemListControllerSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListControllerSearch.swift; sourceTree = "<group>"; };
|
||||
D0D3286422F3366500D07EE2 /* ItemListControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListControllerNode.swift; sourceTree = "<group>"; };
|
||||
D0D3286B22F3367300D07EE2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D0D3286D22F3367700D07EE2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D0D3286F22F3367D00D07EE2 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3287122F3368300D07EE2 /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3287322F3368C00D07EE2 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3287522F3369200D07EE2 /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3289722F3449800D07EE2 /* MergeLists.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MergeLists.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3289922F345C500D07EE2 /* ItemListItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListItem.swift; sourceTree = "<group>"; };
|
||||
D0D328A422F346C200D07EE2 /* ItemListTextItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListTextItem.swift; sourceTree = "<group>"; };
|
||||
D0D328DD22F34A0D00D07EE2 /* TextFormat.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TextFormat.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D0D3281C22F3205E00D07EE2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D06018E322F366F200796784 /* CheckNode.framework in Frameworks */,
|
||||
D06018A222F3619000796784 /* AnimationUI.framework in Frameworks */,
|
||||
D06018A022F3618B00796784 /* SwitchNode.framework in Frameworks */,
|
||||
D060182122F35C2300796784 /* ProgressNavigationButtonNode.framework in Frameworks */,
|
||||
D0D328DE22F34A0D00D07EE2 /* TextFormat.framework in Frameworks */,
|
||||
D0D3289822F3449800D07EE2 /* MergeLists.framework in Frameworks */,
|
||||
D0D3287622F3369200D07EE2 /* TelegramPresentationData.framework in Frameworks */,
|
||||
D0D3287422F3368C00D07EE2 /* AccountContext.framework in Frameworks */,
|
||||
D0D3287222F3368300D07EE2 /* Display.framework in Frameworks */,
|
||||
D0D3287022F3367D00D07EE2 /* AsyncDisplayKit.framework in Frameworks */,
|
||||
D0D3286E22F3367700D07EE2 /* Foundation.framework in Frameworks */,
|
||||
D0D3286C22F3367300D07EE2 /* UIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D060185D22F35E2200796784 /* Items */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060184C22F35E1E00796784 /* ItemListActionItem.swift */,
|
||||
D060184B22F35E1E00796784 /* ItemListActivityTextItem.swift */,
|
||||
D060185222F35E1F00796784 /* ItemListCheckboxItem.swift */,
|
||||
D060185022F35E1E00796784 /* ItemListDisclosureItem.swift */,
|
||||
D060184F22F35E1E00796784 /* ItemListEditableItem.swift */,
|
||||
D060184922F35E1E00796784 /* ItemListMultilineInputItem.swift */,
|
||||
D060185122F35E1E00796784 /* ItemListMultilineTextItem.swift */,
|
||||
D060184D22F35E1E00796784 /* ItemListSwitchItem.swift */,
|
||||
D060184A22F35E1E00796784 /* ItemListTextWithLabelItem.swift */,
|
||||
D0D328A422F346C200D07EE2 /* ItemListTextItem.swift */,
|
||||
);
|
||||
path = Items;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3281522F3205E00D07EE2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3282322F3205E00D07EE2 /* Info.plist */,
|
||||
D0D3282122F3205E00D07EE2 /* Sources */,
|
||||
D0D3282022F3205E00D07EE2 /* Products */,
|
||||
D0D3286A22F3367300D07EE2 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3282022F3205E00D07EE2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3281F22F3205E00D07EE2 /* ItemListUI.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3282122F3205E00D07EE2 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060185D22F35E2200796784 /* Items */,
|
||||
D060184E22F35E1E00796784 /* ItemListLoadingIndicatorEmptyStateItem.swift */,
|
||||
D0D3286222F3366500D07EE2 /* ItemListController.swift */,
|
||||
D0D3286022F3366500D07EE2 /* ItemListControllerEmptyStateItem.swift */,
|
||||
D0D3286422F3366500D07EE2 /* ItemListControllerNode.swift */,
|
||||
D0D3286322F3366500D07EE2 /* ItemListControllerSearch.swift */,
|
||||
D0D3286122F3366500D07EE2 /* ItemListControllerSegmentedTitleView.swift */,
|
||||
D0D3289922F345C500D07EE2 /* ItemListItem.swift */,
|
||||
D060186022F35F6B00796784 /* ItemListRevealOptionsNode.swift */,
|
||||
D06018BA22F3663900796784 /* ItemListEditableDeleteControlNode.swift */,
|
||||
D06018B822F3663800796784 /* ItemListEditableReorderControlNode.swift */,
|
||||
D06018B922F3663800796784 /* ItemListSelectableControlNode.swift */,
|
||||
D0D3282222F3205E00D07EE2 /* ItemListUI.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3286A22F3367300D07EE2 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06018E222F366F200796784 /* CheckNode.framework */,
|
||||
D06018A122F3619000796784 /* AnimationUI.framework */,
|
||||
D060189F22F3618B00796784 /* SwitchNode.framework */,
|
||||
D060182022F35C2300796784 /* ProgressNavigationButtonNode.framework */,
|
||||
D0D328DD22F34A0D00D07EE2 /* TextFormat.framework */,
|
||||
D0D3289722F3449800D07EE2 /* MergeLists.framework */,
|
||||
D0D3287522F3369200D07EE2 /* TelegramPresentationData.framework */,
|
||||
D0D3287322F3368C00D07EE2 /* AccountContext.framework */,
|
||||
D0D3287122F3368300D07EE2 /* Display.framework */,
|
||||
D0D3286F22F3367D00D07EE2 /* AsyncDisplayKit.framework */,
|
||||
D0D3286D22F3367700D07EE2 /* Foundation.framework */,
|
||||
D0D3286B22F3367300D07EE2 /* UIKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D0D3281A22F3205E00D07EE2 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3282422F3205E00D07EE2 /* ItemListUI.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D0D3281E22F3205E00D07EE2 /* ItemListUI */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D0D3282722F3205E00D07EE2 /* Build configuration list for PBXNativeTarget "ItemListUI" */;
|
||||
buildPhases = (
|
||||
D0D3281A22F3205E00D07EE2 /* Headers */,
|
||||
D0D3281B22F3205E00D07EE2 /* Sources */,
|
||||
D0D3281C22F3205E00D07EE2 /* Frameworks */,
|
||||
D0D3281D22F3205E00D07EE2 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ItemListUI;
|
||||
productName = ItemListUI;
|
||||
productReference = D0D3281F22F3205E00D07EE2 /* ItemListUI.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D0D3281622F3205E00D07EE2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D0D3281E22F3205E00D07EE2 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D0D3281922F3205E00D07EE2 /* Build configuration list for PBXProject "ItemListUI_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D0D3281522F3205E00D07EE2;
|
||||
productRefGroup = D0D3282022F3205E00D07EE2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D0D3281E22F3205E00D07EE2 /* ItemListUI */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D0D3281D22F3205E00D07EE2 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D0D3281B22F3205E00D07EE2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060185322F35E1F00796784 /* ItemListMultilineInputItem.swift in Sources */,
|
||||
D06018BB22F3663900796784 /* ItemListEditableReorderControlNode.swift in Sources */,
|
||||
D060185522F35E1F00796784 /* ItemListActivityTextItem.swift in Sources */,
|
||||
D060186122F35F6C00796784 /* ItemListRevealOptionsNode.swift in Sources */,
|
||||
D06018BC22F3663900796784 /* ItemListSelectableControlNode.swift in Sources */,
|
||||
D060185822F35E1F00796784 /* ItemListLoadingIndicatorEmptyStateItem.swift in Sources */,
|
||||
D0D3286522F3366600D07EE2 /* ItemListControllerEmptyStateItem.swift in Sources */,
|
||||
D060185622F35E1F00796784 /* ItemListActionItem.swift in Sources */,
|
||||
D060185922F35E1F00796784 /* ItemListEditableItem.swift in Sources */,
|
||||
D060185A22F35E1F00796784 /* ItemListDisclosureItem.swift in Sources */,
|
||||
D060185422F35E1F00796784 /* ItemListTextWithLabelItem.swift in Sources */,
|
||||
D0D3286722F3366600D07EE2 /* ItemListController.swift in Sources */,
|
||||
D0D3286822F3366600D07EE2 /* ItemListControllerSearch.swift in Sources */,
|
||||
D060185722F35E1F00796784 /* ItemListSwitchItem.swift in Sources */,
|
||||
D0D3286622F3366600D07EE2 /* ItemListControllerSegmentedTitleView.swift in Sources */,
|
||||
D060185B22F35E1F00796784 /* ItemListMultilineTextItem.swift in Sources */,
|
||||
D0D3286922F3366600D07EE2 /* ItemListControllerNode.swift in Sources */,
|
||||
D0D328A522F346C200D07EE2 /* ItemListTextItem.swift in Sources */,
|
||||
D06018BD22F3663900796784 /* ItemListEditableDeleteControlNode.swift in Sources */,
|
||||
D0D3289A22F345C500D07EE2 /* ItemListItem.swift in Sources */,
|
||||
D060185C22F35E1F00796784 /* ItemListCheckboxItem.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D0D3282522F3205E00D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3282622F3205E00D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3282822F3205E00D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3282922F3205E00D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3282A22F3208400D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3282B22F3208400D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3282C22F3209200D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D0D3282D22F3209200D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListUI;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D0D3281922F3205E00D07EE2 /* Build configuration list for PBXProject "ItemListUI_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3282522F3205E00D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3282A22F3208400D07EE2 /* DebugHockeyapp */,
|
||||
D0D3282622F3205E00D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3282C22F3209200D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3282722F3205E00D07EE2 /* Build configuration list for PBXNativeTarget "ItemListUI" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3282822F3205E00D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3282B22F3208400D07EE2 /* DebugHockeyapp */,
|
||||
D0D3282922F3205E00D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3282D22F3209200D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D0D3281622F3205E00D07EE2 /* Project object */;
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D0D3281E22F3205E00D07EE2"
|
||||
BuildableName = "ItemListUI.framework"
|
||||
BlueprintName = "ItemListUI"
|
||||
ReferencedContainer = "container:ItemListUI_Xcode.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "DebugAppStoreLLC"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "DebugHockeyapp"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D0D3281E22F3205E00D07EE2"
|
||||
BuildableName = "ItemListUI.framework"
|
||||
BlueprintName = "ItemListUI"
|
||||
ReferencedContainer = "container:ItemListUI_Xcode.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "ReleaseAppStoreLLC"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D0D3281E22F3205E00D07EE2"
|
||||
BuildableName = "ItemListUI.framework"
|
||||
BlueprintName = "ItemListUI"
|
||||
ReferencedContainer = "container:ItemListUI_Xcode.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "DebugAppStoreLLC">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "ReleaseAppStoreLLC"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -4,101 +4,70 @@ import Display
|
|||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import TelegramPresentationData
|
||||
import AccountContext
|
||||
import ProgressNavigationButtonNode
|
||||
|
||||
enum ItemListNavigationButtonStyle {
|
||||
public enum ItemListNavigationButtonStyle {
|
||||
case regular
|
||||
case bold
|
||||
case activity
|
||||
|
||||
var barButtonItemStyle: UIBarButtonItemStyle {
|
||||
public var barButtonItemStyle: UIBarButtonItem.Style {
|
||||
switch self {
|
||||
case .regular, .activity:
|
||||
return .plain
|
||||
case .bold:
|
||||
return .done
|
||||
case .regular, .activity:
|
||||
return .plain
|
||||
case .bold:
|
||||
return .done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum ItemListNavigationButtonContentIcon {
|
||||
public enum ItemListNavigationButtonContentIcon {
|
||||
case search
|
||||
case add
|
||||
}
|
||||
|
||||
enum ItemListNavigationButtonContent: Equatable {
|
||||
public enum ItemListNavigationButtonContent: Equatable {
|
||||
case none
|
||||
case text(String)
|
||||
case icon(ItemListNavigationButtonContentIcon)
|
||||
}
|
||||
|
||||
public struct ItemListNavigationButton {
|
||||
public let content: ItemListNavigationButtonContent
|
||||
public let style: ItemListNavigationButtonStyle
|
||||
public let enabled: Bool
|
||||
public let action: () -> Void
|
||||
|
||||
static func ==(lhs: ItemListNavigationButtonContent, rhs: ItemListNavigationButtonContent) -> Bool {
|
||||
switch lhs {
|
||||
case .none:
|
||||
if case .none = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .text(value):
|
||||
if case .text(value) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .icon(value):
|
||||
if case .icon(value) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
public init(content: ItemListNavigationButtonContent, style: ItemListNavigationButtonStyle, enabled: Bool, action: @escaping () -> Void) {
|
||||
self.content = content
|
||||
self.style = style
|
||||
self.enabled = enabled
|
||||
self.action = action
|
||||
}
|
||||
}
|
||||
|
||||
struct ItemListNavigationButton {
|
||||
let content: ItemListNavigationButtonContent
|
||||
let style: ItemListNavigationButtonStyle
|
||||
let enabled: Bool
|
||||
let action: () -> Void
|
||||
}
|
||||
|
||||
struct ItemListBackButton: Equatable {
|
||||
let title: String
|
||||
public struct ItemListBackButton: Equatable {
|
||||
public let title: String
|
||||
|
||||
static func ==(lhs: ItemListBackButton, rhs: ItemListBackButton) -> Bool {
|
||||
return lhs.title == rhs.title
|
||||
public init(title: String) {
|
||||
self.title = title
|
||||
}
|
||||
}
|
||||
|
||||
enum ItemListControllerTitle: Equatable {
|
||||
public enum ItemListControllerTitle: Equatable {
|
||||
case text(String)
|
||||
case sectionControl([String], Int)
|
||||
|
||||
static func ==(lhs: ItemListControllerTitle, rhs: ItemListControllerTitle) -> Bool {
|
||||
switch lhs {
|
||||
case let .text(text):
|
||||
if case .text(text) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .sectionControl(lhsSection, lhsIndex):
|
||||
if case let .sectionControl(rhsSection, rhsIndex) = rhs, lhsSection == rhsSection, lhsIndex == rhsIndex {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class ItemListControllerTabBarItem: Equatable {
|
||||
public final class ItemListControllerTabBarItem: Equatable {
|
||||
let title: String
|
||||
let image: UIImage?
|
||||
let selectedImage: UIImage?
|
||||
let tintImages: Bool
|
||||
let badgeValue: String?
|
||||
|
||||
init(title: String, image: UIImage?, selectedImage: UIImage?, tintImages: Bool = true, badgeValue: String? = nil) {
|
||||
public init(title: String, image: UIImage?, selectedImage: UIImage?, tintImages: Bool = true, badgeValue: String? = nil) {
|
||||
self.title = title
|
||||
self.image = image
|
||||
self.selectedImage = selectedImage
|
||||
|
|
@ -106,12 +75,12 @@ final class ItemListControllerTabBarItem: Equatable {
|
|||
self.badgeValue = badgeValue
|
||||
}
|
||||
|
||||
static func ==(lhs: ItemListControllerTabBarItem, rhs: ItemListControllerTabBarItem) -> Bool {
|
||||
public static func ==(lhs: ItemListControllerTabBarItem, rhs: ItemListControllerTabBarItem) -> Bool {
|
||||
return lhs.title == rhs.title && lhs.image === rhs.image && lhs.selectedImage === rhs.selectedImage && lhs.tintImages == rhs.tintImages && lhs.badgeValue == rhs.badgeValue
|
||||
}
|
||||
}
|
||||
|
||||
struct ItemListControllerState {
|
||||
public struct ItemListControllerState {
|
||||
let theme: PresentationTheme
|
||||
let title: ItemListControllerTitle
|
||||
let leftNavigationButton: ItemListNavigationButton?
|
||||
|
|
@ -121,7 +90,7 @@ struct ItemListControllerState {
|
|||
let tabBarItem: ItemListControllerTabBarItem?
|
||||
let animateChanges: Bool
|
||||
|
||||
init(theme: PresentationTheme, title: ItemListControllerTitle, leftNavigationButton: ItemListNavigationButton?, rightNavigationButton: ItemListNavigationButton?, secondaryRightNavigationButton: ItemListNavigationButton? = nil, backNavigationButton: ItemListBackButton?, tabBarItem: ItemListControllerTabBarItem? = nil, animateChanges: Bool = true) {
|
||||
public init(theme: PresentationTheme, title: ItemListControllerTitle, leftNavigationButton: ItemListNavigationButton?, rightNavigationButton: ItemListNavigationButton?, secondaryRightNavigationButton: ItemListNavigationButton? = nil, backNavigationButton: ItemListBackButton?, tabBarItem: ItemListControllerTabBarItem? = nil, animateChanges: Bool = true) {
|
||||
self.theme = theme
|
||||
self.title = title
|
||||
self.leftNavigationButton = leftNavigationButton
|
||||
|
|
@ -133,7 +102,7 @@ struct ItemListControllerState {
|
|||
}
|
||||
}
|
||||
|
||||
class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutResponder, PresentableController {
|
||||
open class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutResponder, PresentableController {
|
||||
private let state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>
|
||||
|
||||
private var leftNavigationButtonTitleAndStyle: (ItemListNavigationButtonContent, ItemListNavigationButtonStyle)?
|
||||
|
|
@ -149,20 +118,20 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
private var validLayout: ContainerViewLayout?
|
||||
|
||||
private var didPlayPresentationAnimation = false
|
||||
private(set) var didAppearOnce = false
|
||||
var didAppear: ((Bool) -> Void)?
|
||||
public private(set) var didAppearOnce = false
|
||||
public var didAppear: ((Bool) -> Void)?
|
||||
private var isDismissed = false
|
||||
|
||||
var titleControlValueChanged: ((Int) -> Void)?
|
||||
public var titleControlValueChanged: ((Int) -> Void)?
|
||||
|
||||
private var tabBarItemDisposable: Disposable?
|
||||
|
||||
private let _ready = Promise<Bool>()
|
||||
override var ready: Promise<Bool> {
|
||||
override open var ready: Promise<Bool> {
|
||||
return self._ready
|
||||
}
|
||||
|
||||
var experimentalSnapScrollToItem: Bool = false {
|
||||
public var experimentalSnapScrollToItem: Bool = false {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.experimentalSnapScrollToItem = self.experimentalSnapScrollToItem
|
||||
|
|
@ -170,7 +139,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var enableInteractiveDismiss = false {
|
||||
public var enableInteractiveDismiss = false {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).enableInteractiveDismiss = self.enableInteractiveDismiss
|
||||
|
|
@ -178,7 +147,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var alwaysSynchronous = false {
|
||||
public var alwaysSynchronous = false {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).alwaysSynchronous = self.alwaysSynchronous
|
||||
|
|
@ -186,7 +155,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var visibleEntriesUpdated: ((ItemListNodeVisibleEntries<Entry>) -> Void)? {
|
||||
public var visibleEntriesUpdated: ((ItemListNodeVisibleEntries<Entry>) -> Void)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).visibleEntriesUpdated = self.visibleEntriesUpdated
|
||||
|
|
@ -194,7 +163,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var visibleBottomContentOffsetChanged: ((ListViewVisibleContentOffset) -> Void)? {
|
||||
public var visibleBottomContentOffsetChanged: ((ListViewVisibleContentOffset) -> Void)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).visibleBottomContentOffsetChanged = self.visibleBottomContentOffsetChanged
|
||||
|
|
@ -202,14 +171,15 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var contentOffsetChanged: ((ListViewVisibleContentOffset, Bool) -> Void)? {
|
||||
public var contentOffsetChanged: ((ListViewVisibleContentOffset, Bool) -> Void)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).contentOffsetChanged = self.contentOffsetChanged
|
||||
}
|
||||
}
|
||||
}
|
||||
var contentScrollingEnded: ((ListView) -> Bool)? {
|
||||
|
||||
public var contentScrollingEnded: ((ListView) -> Bool)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).contentScrollingEnded = self.contentScrollingEnded
|
||||
|
|
@ -217,7 +187,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var searchActivated: ((Bool) -> Void)? {
|
||||
public var searchActivated: ((Bool) -> Void)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).searchActivated = self.searchActivated
|
||||
|
|
@ -225,9 +195,9 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var willScrollToTop: (() -> Void)?
|
||||
public var willScrollToTop: (() -> Void)?
|
||||
|
||||
var reorderEntry: ((Int, Int, [Entry]) -> Void)? {
|
||||
public var reorderEntry: ((Int, Int, [Entry]) -> Void)? {
|
||||
didSet {
|
||||
if self.isNodeLoaded {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).reorderEntry = self.reorderEntry
|
||||
|
|
@ -235,22 +205,22 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
var previewItemWithTag: ((ItemListItemTag) -> UIViewController?)?
|
||||
var commitPreview: ((UIViewController) -> Void)?
|
||||
public var previewItemWithTag: ((ItemListItemTag) -> UIViewController?)?
|
||||
public var commitPreview: ((UIViewController) -> Void)?
|
||||
|
||||
var willDisappear: ((Bool) -> Void)?
|
||||
var didDisappear: ((Bool) -> Void)?
|
||||
public var willDisappear: ((Bool) -> Void)?
|
||||
public var didDisappear: ((Bool) -> Void)?
|
||||
|
||||
convenience init(context: AccountContext, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>? = nil) {
|
||||
self.init(sharedContext: context.sharedContext, state: state, tabBarItem: tabBarItem)
|
||||
convenience public init(context: AccountContext, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>? = nil) {
|
||||
self.init(sharedContext: context.genericSharedContext, state: state, tabBarItem: tabBarItem)
|
||||
}
|
||||
|
||||
convenience init(sharedContext: SharedAccountContext, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>? = nil) {
|
||||
convenience public init(sharedContext: SharedAccountContext, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>? = nil) {
|
||||
let presentationData = sharedContext.currentPresentationData.with { $0 }
|
||||
self.init(theme: presentationData.theme, strings: presentationData.strings, updatedPresentationData: sharedContext.presentationData |> map { ($0.theme, $0.strings) }, state: state, tabBarItem: tabBarItem)
|
||||
}
|
||||
|
||||
init(theme: PresentationTheme, strings: PresentationStrings, updatedPresentationData: Signal<(theme: PresentationTheme, strings: PresentationStrings), NoError>, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>?) {
|
||||
public init(theme: PresentationTheme, strings: PresentationStrings, updatedPresentationData: Signal<(theme: PresentationTheme, strings: PresentationStrings), NoError>, state: Signal<(ItemListControllerState, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>, tabBarItem: Signal<ItemListControllerTabBarItem, NoError>?) {
|
||||
self.state = state
|
||||
|
||||
self.theme = theme
|
||||
|
|
@ -284,7 +254,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +262,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
self.tabBarItemDisposable?.dispose()
|
||||
}
|
||||
|
||||
override func loadDisplayNode() {
|
||||
override open func loadDisplayNode() {
|
||||
let previousControllerState = Atomic<ItemListControllerState?>(value: nil)
|
||||
let nodeState = self.state
|
||||
|> deliverOnMainQueue
|
||||
|
|
@ -467,7 +437,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
self._ready.set((self.displayNode as! ItemListControllerNode<Entry>).ready)
|
||||
}
|
||||
|
||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
override open func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.validLayout = layout
|
||||
|
|
@ -487,13 +457,13 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
self.navigationButtonActions.secondaryRight?()
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
override open func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
self.viewDidAppear(completion: {})
|
||||
}
|
||||
|
||||
func viewDidAppear(completion: @escaping () -> Void) {
|
||||
public func viewDidAppear(completion: @escaping () -> Void) {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.preloadPages = true
|
||||
|
||||
if let presentationArguments = self.presentationArguments as? ViewControllerPresentationArguments, !self.didPlayPresentationAnimation {
|
||||
|
|
@ -515,26 +485,26 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
self.didAppear?(firstTime)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
override open func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
self.willDisappear?(animated)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
override open func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
self.didDisappear?(animated)
|
||||
}
|
||||
|
||||
override func dismiss(completion: (() -> Void)? = nil) {
|
||||
override open func dismiss(completion: (() -> Void)? = nil) {
|
||||
if !self.isDismissed {
|
||||
self.isDismissed = true
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).animateOut(completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
func frameForItemNode(_ predicate: (ListViewItemNode) -> Bool) -> CGRect? {
|
||||
public func frameForItemNode(_ predicate: (ListViewItemNode) -> Bool) -> CGRect? {
|
||||
var result: CGRect?
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.forEachItemNode { itemNode in
|
||||
if let itemNode = itemNode as? ListViewItemNode {
|
||||
|
|
@ -546,7 +516,7 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
return result
|
||||
}
|
||||
|
||||
func forEachItemNode(_ f: (ListViewItemNode) -> Void) {
|
||||
public func forEachItemNode(_ f: (ListViewItemNode) -> Void) {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.forEachItemNode { itemNode in
|
||||
if let itemNode = itemNode as? ListViewItemNode {
|
||||
f(itemNode)
|
||||
|
|
@ -554,15 +524,15 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
func ensureItemNodeVisible(_ itemNode: ListViewItemNode) {
|
||||
public func ensureItemNodeVisible(_ itemNode: ListViewItemNode) {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.ensureItemNodeVisible(itemNode)
|
||||
}
|
||||
|
||||
func afterLayout(_ f: @escaping () -> Void) {
|
||||
public func afterLayout(_ f: @escaping () -> Void) {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).afterLayout(f)
|
||||
}
|
||||
|
||||
func previewingController(from sourceView: UIView, for location: CGPoint) -> (UIViewController, CGRect)? {
|
||||
public func previewingController(from sourceView: UIView, for location: CGPoint) -> (UIViewController, CGRect)? {
|
||||
guard let layout = self.validLayout else {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -599,16 +569,16 @@ class ItemListController<Entry: ItemListNodeEntry>: ViewController, KeyShortcutR
|
|||
}
|
||||
}
|
||||
|
||||
func clearItemNodesHighlight(animated: Bool = false) {
|
||||
public func clearItemNodesHighlight(animated: Bool = false) {
|
||||
(self.displayNode as! ItemListControllerNode<Entry>).listNode.clearHighlightAnimated(animated)
|
||||
}
|
||||
|
||||
func previewingCommit(_ viewControllerToCommit: UIViewController) {
|
||||
public func previewingCommit(_ viewControllerToCommit: UIViewController) {
|
||||
self.commitPreview?(viewControllerToCommit)
|
||||
}
|
||||
|
||||
public var keyShortcuts: [KeyShortcut] {
|
||||
return [KeyShortcut(input: UIKeyInputEscape, action: { [weak self] in
|
||||
return [KeyShortcut(input: UIKeyCommand.inputEscape, action: { [weak self] in
|
||||
if !(self?.navigationController?.topViewController is TabBarController) {
|
||||
_ = self?.navigationBar?.executeBack()
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
|
||||
public protocol ItemListControllerEmptyStateItem {
|
||||
func isEqual(to: ItemListControllerEmptyStateItem) -> Bool
|
||||
func node(current: ItemListControllerEmptyStateItemNode?) -> ItemListControllerEmptyStateItemNode
|
||||
}
|
||||
|
||||
open class ItemListControllerEmptyStateItemNode: ASDisplayNode {
|
||||
open func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
}
|
||||
}
|
||||
|
|
@ -5,10 +5,11 @@ import Display
|
|||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import TelegramPresentationData
|
||||
import MergeLists
|
||||
|
||||
typealias ItemListSectionId = Int32
|
||||
public typealias ItemListSectionId = Int32
|
||||
|
||||
protocol ItemListNodeEntry: Comparable, Identifiable {
|
||||
public protocol ItemListNodeEntry: Comparable, Identifiable {
|
||||
associatedtype ItemGenerationArguments
|
||||
|
||||
var section: ItemListSectionId { get }
|
||||
|
|
@ -17,7 +18,7 @@ protocol ItemListNodeEntry: Comparable, Identifiable {
|
|||
func item(_ arguments: ItemGenerationArguments) -> ListViewItem
|
||||
}
|
||||
|
||||
extension ItemListNodeEntry {
|
||||
public extension ItemListNodeEntry {
|
||||
var tag: ItemListItemTag? { return nil }
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ private func preparedItemListNodeEntryTransition<Entry: ItemListNodeEntry>(from
|
|||
return ItemListNodeEntryTransition(deletions: deletions, insertions: insertions, updates: updates)
|
||||
}
|
||||
|
||||
enum ItemListStyle {
|
||||
public enum ItemListStyle {
|
||||
case plain
|
||||
case blocks
|
||||
}
|
||||
|
|
@ -59,7 +60,7 @@ private struct ItemListNodeTransition<Entry: ItemListNodeEntry> {
|
|||
let scrollEnabled: Bool
|
||||
}
|
||||
|
||||
struct ItemListNodeState<Entry: ItemListNodeEntry> {
|
||||
public struct ItemListNodeState<Entry: ItemListNodeEntry> {
|
||||
let entries: [Entry]
|
||||
let style: ItemListStyle
|
||||
let emptyStateItem: ItemListControllerEmptyStateItem?
|
||||
|
|
@ -71,7 +72,7 @@ struct ItemListNodeState<Entry: ItemListNodeEntry> {
|
|||
let ensureVisibleItemTag: ItemListItemTag?
|
||||
let initialScrollToItem: ListViewScrollToItem?
|
||||
|
||||
init(entries: [Entry], style: ItemListStyle, focusItemTag: ItemListItemTag? = nil, ensureVisibleItemTag: ItemListItemTag? = nil, emptyStateItem: ItemListControllerEmptyStateItem? = nil, searchItem: ItemListControllerSearch? = nil, initialScrollToItem: ListViewScrollToItem? = nil, crossfadeState: Bool = false, animateChanges: Bool = true, scrollEnabled: Bool = true) {
|
||||
public init(entries: [Entry], style: ItemListStyle, focusItemTag: ItemListItemTag? = nil, ensureVisibleItemTag: ItemListItemTag? = nil, emptyStateItem: ItemListControllerEmptyStateItem? = nil, searchItem: ItemListControllerSearch? = nil, initialScrollToItem: ListViewScrollToItem? = nil, crossfadeState: Bool = false, animateChanges: Bool = true, scrollEnabled: Bool = true) {
|
||||
self.entries = entries
|
||||
self.style = style
|
||||
self.emptyStateItem = emptyStateItem
|
||||
|
|
@ -93,21 +94,21 @@ private final class ItemListNodeOpaqueState<Entry: ItemListNodeEntry> {
|
|||
}
|
||||
}
|
||||
|
||||
final class ItemListNodeVisibleEntries<Entry: ItemListNodeEntry>: Sequence {
|
||||
public final class ItemListNodeVisibleEntries<Entry: ItemListNodeEntry>: Sequence {
|
||||
let iterate: () -> Entry?
|
||||
|
||||
init(iterate: @escaping () -> Entry?) {
|
||||
self.iterate = iterate
|
||||
}
|
||||
|
||||
func makeIterator() -> AnyIterator<Entry> {
|
||||
public func makeIterator() -> AnyIterator<Entry> {
|
||||
return AnyIterator { () -> Entry? in
|
||||
return self.iterate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayerView, PreviewingHostView {
|
||||
public final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayerView, PreviewingHostView {
|
||||
var onLayout: (() -> Void)?
|
||||
|
||||
init(controller: ItemListController<Entry>?) {
|
||||
|
|
@ -120,7 +121,7 @@ final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayer
|
|||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
override public func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
self.onLayout?()
|
||||
|
|
@ -129,7 +130,7 @@ final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayer
|
|||
private var inHitTest = false
|
||||
var hitTestImpl: ((CGPoint, UIEvent?) -> UIView?)?
|
||||
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
if self.inHitTest {
|
||||
return super.hitTest(point, with: event)
|
||||
} else {
|
||||
|
|
@ -140,7 +141,7 @@ final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayer
|
|||
}
|
||||
}
|
||||
|
||||
var previewingDelegate: PreviewingHostViewDelegate? {
|
||||
public var previewingDelegate: PreviewingHostViewDelegate? {
|
||||
return PreviewingHostViewDelegate(controllerForLocation: { [weak self] sourceView, point in
|
||||
return self?.controller?.previewingController(from: sourceView, for: point)
|
||||
}, commitController: { [weak self] controller in
|
||||
|
|
@ -151,16 +152,16 @@ final class ItemListControllerNodeView<Entry: ItemListNodeEntry>: UITracingLayer
|
|||
weak var controller: ItemListController<Entry>?
|
||||
}
|
||||
|
||||
class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollViewDelegate {
|
||||
open class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollViewDelegate {
|
||||
private var _ready = ValuePromise<Bool>()
|
||||
public var ready: Signal<Bool, NoError> {
|
||||
open var ready: Signal<Bool, NoError> {
|
||||
return self._ready.get()
|
||||
}
|
||||
private var didSetReady = false
|
||||
|
||||
private let navigationBar: NavigationBar
|
||||
|
||||
let listNode: ListView
|
||||
public let listNode: ListView
|
||||
private var emptyStateItem: ItemListControllerEmptyStateItem?
|
||||
private var emptyStateNode: ItemListControllerEmptyStateItemNode?
|
||||
|
||||
|
|
@ -180,25 +181,25 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
|
||||
private var afterLayoutActions: [() -> Void] = []
|
||||
|
||||
let updateNavigationOffset: (CGFloat) -> Void
|
||||
var dismiss: (() -> Void)?
|
||||
public let updateNavigationOffset: (CGFloat) -> Void
|
||||
public var dismiss: (() -> Void)?
|
||||
|
||||
var visibleEntriesUpdated: ((ItemListNodeVisibleEntries<Entry>) -> Void)?
|
||||
var visibleBottomContentOffsetChanged: ((ListViewVisibleContentOffset) -> Void)?
|
||||
var contentOffsetChanged: ((ListViewVisibleContentOffset, Bool) -> Void)?
|
||||
var contentScrollingEnded: ((ListView) -> Bool)?
|
||||
var searchActivated: ((Bool) -> Void)?
|
||||
var reorderEntry: ((Int, Int, [Entry]) -> Void)?
|
||||
var requestLayout: ((ContainedViewLayoutTransition) -> Void)?
|
||||
public var visibleEntriesUpdated: ((ItemListNodeVisibleEntries<Entry>) -> Void)?
|
||||
public var visibleBottomContentOffsetChanged: ((ListViewVisibleContentOffset) -> Void)?
|
||||
public var contentOffsetChanged: ((ListViewVisibleContentOffset, Bool) -> Void)?
|
||||
public var contentScrollingEnded: ((ListView) -> Bool)?
|
||||
public var searchActivated: ((Bool) -> Void)?
|
||||
public var reorderEntry: ((Int, Int, [Entry]) -> Void)?
|
||||
public var requestLayout: ((ContainedViewLayoutTransition) -> Void)?
|
||||
|
||||
var enableInteractiveDismiss = false {
|
||||
public var enableInteractiveDismiss = false {
|
||||
didSet {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var alwaysSynchronous = false
|
||||
|
||||
init(controller: ItemListController<Entry>?, navigationBar: NavigationBar, updateNavigationOffset: @escaping (CGFloat) -> Void, state: Signal<(PresentationTheme, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>) {
|
||||
public init(controller: ItemListController<Entry>?, navigationBar: NavigationBar, updateNavigationOffset: @escaping (CGFloat) -> Void, state: Signal<(PresentationTheme, (ItemListNodeState<Entry>, Entry.ItemGenerationArguments)), NoError>) {
|
||||
self.navigationBar = navigationBar
|
||||
self.updateNavigationOffset = updateNavigationOffset
|
||||
|
||||
|
|
@ -289,7 +290,7 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
self.transitionDisposable.dispose()
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override open func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
(self.view as? ItemListControllerNodeView<Entry>)?.onLayout = { [weak self] in
|
||||
|
|
@ -310,14 +311,14 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
}
|
||||
}
|
||||
|
||||
func animateIn(completion: (() -> Void)? = nil) {
|
||||
open func animateIn(completion: (() -> Void)? = nil) {
|
||||
self.layer.animatePosition(from: CGPoint(x: self.layer.position.x, y: self.layer.position.y + self.layer.bounds.size.height), to: self.layer.position, duration: 0.5, timingFunction: kCAMediaTimingFunctionSpring, completion: { _ in
|
||||
completion?()
|
||||
})
|
||||
}
|
||||
|
||||
func animateOut(completion: (() -> Void)? = nil) {
|
||||
self.layer.animatePosition(from: self.layer.position, to: CGPoint(x: self.layer.position.x, y: self.layer.position.y + self.layer.bounds.size.height), duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
open func animateOut(completion: (() -> Void)? = nil) {
|
||||
self.layer.animatePosition(from: self.layer.position, to: CGPoint(x: self.layer.position.x, y: self.layer.position.y + self.layer.bounds.size.height), duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
if let strongSelf = self {
|
||||
strongSelf.dismiss?()
|
||||
}
|
||||
|
|
@ -325,7 +326,7 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
})
|
||||
}
|
||||
|
||||
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
open func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
var duration: Double = 0.0
|
||||
var curve: UInt = 0
|
||||
switch transition {
|
||||
|
|
@ -607,15 +608,15 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
}
|
||||
}
|
||||
|
||||
func scrollToTop() {
|
||||
open func scrollToTop() {
|
||||
self.listNode.transaction(deleteIndices: [], insertIndicesAndItems: [], updateIndicesAndItems: [], options: [.Synchronous, .LowLatency], scrollToItem: ListViewScrollToItem(index: 0, position: .top(0.0), animated: true, curve: .Default(duration: nil), directionHint: .Up), updateSizeAndInsets: nil, stationaryItemRange: nil, updateOpaqueState: nil, completion: { _ in })
|
||||
self.searchNode?.scrollToTop()
|
||||
}
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
open func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
let distanceFromEquilibrium = scrollView.contentOffset.y - scrollView.contentSize.height / 3.0
|
||||
|
||||
let transition = 1.0 - min(1.0, max(0.0, abs(distanceFromEquilibrium) / 50.0))
|
||||
//let transition = 1.0 - min(1.0, max(0.0, abs(distanceFromEquilibrium) / 50.0))
|
||||
|
||||
self.updateNavigationOffset(-distanceFromEquilibrium)
|
||||
|
||||
|
|
@ -624,7 +625,7 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
}*/
|
||||
}
|
||||
|
||||
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
|
||||
open func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
|
||||
targetContentOffset.pointee = scrollView.contentOffset
|
||||
|
||||
let scrollVelocity = scrollView.panGestureRecognizer.velocity(in: scrollView)
|
||||
|
|
@ -634,7 +635,7 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
}
|
||||
}
|
||||
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
override open func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
if let searchNode = self.searchNode {
|
||||
if let result = searchNode.hitTest(point, with: event) {
|
||||
return result
|
||||
|
|
@ -644,7 +645,7 @@ class ItemListControllerNode<Entry: ItemListNodeEntry>: ASDisplayNode, UIScrollV
|
|||
return super.hitTest(point, with: event)
|
||||
}
|
||||
|
||||
func afterLayout(_ f: @escaping () -> Void) {
|
||||
open func afterLayout(_ f: @escaping () -> Void) {
|
||||
self.afterLayoutActions.append(f)
|
||||
self.view.setNeedsLayout()
|
||||
}
|
||||
|
|
@ -3,40 +3,37 @@ import UIKit
|
|||
import AsyncDisplayKit
|
||||
import Display
|
||||
|
||||
protocol ItemListControllerSearchNavigationContentNode {
|
||||
public protocol ItemListControllerSearchNavigationContentNode {
|
||||
func activate()
|
||||
func deactivate()
|
||||
|
||||
func setQueryUpdated(_ f: @escaping (String) -> Void)
|
||||
}
|
||||
|
||||
protocol ItemListControllerSearch {
|
||||
public protocol ItemListControllerSearch {
|
||||
func isEqual(to: ItemListControllerSearch) -> Bool
|
||||
func titleContentNode(current: (NavigationBarContentNode & ItemListControllerSearchNavigationContentNode)?) -> NavigationBarContentNode & ItemListControllerSearchNavigationContentNode
|
||||
func node(current: ItemListControllerSearchNode?, titleContentNode: (NavigationBarContentNode & ItemListControllerSearchNavigationContentNode)?) -> ItemListControllerSearchNode
|
||||
}
|
||||
|
||||
class ItemListControllerSearchNode: ASDisplayNode {
|
||||
func activate() {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
open class ItemListControllerSearchNode: ASDisplayNode {
|
||||
open func activate() {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue)
|
||||
}
|
||||
|
||||
func deactivate() {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
open func deactivate() {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
self?.removeFromSupernode()
|
||||
})
|
||||
}
|
||||
|
||||
func scrollToTop() {
|
||||
|
||||
open func scrollToTop() {
|
||||
}
|
||||
|
||||
func queryUpdated(_ query: String) {
|
||||
|
||||
open func queryUpdated(_ query: String) {
|
||||
}
|
||||
|
||||
func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
|
||||
open func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
final class ItemListControllerSegmentedTitleView: UIView {
|
||||
var segments: [String] {
|
||||
public final class ItemListControllerSegmentedTitleView: UIView {
|
||||
public var segments: [String] {
|
||||
didSet {
|
||||
if self.segments != oldValue {
|
||||
self.control.removeAllSegments()
|
||||
|
|
@ -16,7 +16,7 @@ final class ItemListControllerSegmentedTitleView: UIView {
|
|||
}
|
||||
}
|
||||
|
||||
var index: Int {
|
||||
public var index: Int {
|
||||
didSet {
|
||||
self.control.selectedSegmentIndex = self.index
|
||||
}
|
||||
|
|
@ -24,15 +24,15 @@ final class ItemListControllerSegmentedTitleView: UIView {
|
|||
|
||||
private let control: UISegmentedControl
|
||||
|
||||
var indexUpdated: ((Int) -> Void)?
|
||||
public var indexUpdated: ((Int) -> Void)?
|
||||
|
||||
var color: UIColor {
|
||||
public var color: UIColor {
|
||||
didSet {
|
||||
self.control.tintColor = self.color
|
||||
}
|
||||
}
|
||||
|
||||
init(segments: [String], index: Int, color: UIColor) {
|
||||
public init(segments: [String], index: Int, color: UIColor) {
|
||||
self.segments = segments
|
||||
self.index = index
|
||||
self.color = color
|
||||
|
|
@ -47,11 +47,11 @@ final class ItemListControllerSegmentedTitleView: UIView {
|
|||
self.control.addTarget(self, action: #selector(indexChanged), for: .valueChanged)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
override public func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
let size = self.bounds.size
|
||||
|
|
@ -61,7 +61,7 @@ final class ItemListControllerSegmentedTitleView: UIView {
|
|||
self.control.frame = CGRect(origin: CGPoint(x: floor((size.width - controlSize.width) / 2.0), y: floor((size.height - controlSize.height) / 2.0)), size: controlSize)
|
||||
}
|
||||
|
||||
@objc func indexChanged() {
|
||||
@objc private func indexChanged() {
|
||||
self.indexUpdated?(self.control.selectedSegmentIndex)
|
||||
}
|
||||
}
|
||||
|
|
@ -4,11 +4,11 @@ import AsyncDisplayKit
|
|||
import Display
|
||||
import TelegramPresentationData
|
||||
|
||||
final class ItemListEditableControlNode: ASDisplayNode {
|
||||
var tapped: (() -> Void)?
|
||||
public final class ItemListEditableControlNode: ASDisplayNode {
|
||||
public var tapped: (() -> Void)?
|
||||
private let iconNode: ASImageNode
|
||||
|
||||
override init() {
|
||||
override public init() {
|
||||
self.iconNode = ASImageNode()
|
||||
self.iconNode.isLayerBacked = true
|
||||
|
||||
|
|
@ -17,13 +17,13 @@ final class ItemListEditableControlNode: ASDisplayNode {
|
|||
self.addSubnode(self.iconNode)
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
self.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:))))
|
||||
}
|
||||
|
||||
static func asyncLayout(_ node: ItemListEditableControlNode?) -> (_ height: CGFloat, _ theme: PresentationTheme, _ hidden: Bool) -> (CGSize, () -> ItemListEditableControlNode) {
|
||||
public static func asyncLayout(_ node: ItemListEditableControlNode?) -> (_ height: CGFloat, _ theme: PresentationTheme, _ hidden: Bool) -> (CGSize, () -> ItemListEditableControlNode) {
|
||||
return { height, theme, hidden in
|
||||
let image = PresentationResourcesItemList.itemListDeleteIndicatorIcon(theme)
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ final class ItemListEditableControlNode: ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func tapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
@objc private func tapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
if case .ended = recognizer.state {
|
||||
self.tapped?()
|
||||
}
|
||||
|
|
@ -4,11 +4,11 @@ import AsyncDisplayKit
|
|||
import Display
|
||||
import TelegramPresentationData
|
||||
|
||||
final class ItemListEditableReorderControlNode: ASDisplayNode {
|
||||
var tapped: (() -> Void)?
|
||||
public final class ItemListEditableReorderControlNode: ASDisplayNode {
|
||||
public var tapped: (() -> Void)?
|
||||
private let iconNode: ASImageNode
|
||||
|
||||
override init() {
|
||||
override public init() {
|
||||
self.iconNode = ASImageNode()
|
||||
self.iconNode.displayWithoutProcessing = true
|
||||
self.iconNode.displaysAsynchronously = false
|
||||
|
|
@ -19,7 +19,7 @@ final class ItemListEditableReorderControlNode: ASDisplayNode {
|
|||
self.addSubnode(self.iconNode)
|
||||
}
|
||||
|
||||
static func asyncLayout(_ node: ItemListEditableReorderControlNode?) -> (_ height: CGFloat, _ theme: PresentationTheme) -> (CGSize, (Bool) -> ItemListEditableReorderControlNode) {
|
||||
public static func asyncLayout(_ node: ItemListEditableReorderControlNode?) -> (_ height: CGFloat, _ theme: PresentationTheme) -> (CGSize, (Bool) -> ItemListEditableReorderControlNode) {
|
||||
return { height, theme in
|
||||
let image = PresentationResourcesItemList.itemListReorderIndicatorIcon(theme)
|
||||
|
||||
|
|
@ -2,57 +2,62 @@ import Foundation
|
|||
import UIKit
|
||||
import Display
|
||||
|
||||
protocol ItemListItemTag {
|
||||
public protocol ItemListItemTag {
|
||||
func isEqual(to other: ItemListItemTag) -> Bool
|
||||
}
|
||||
|
||||
protocol ItemListItem {
|
||||
public protocol ItemListItem {
|
||||
var sectionId: ItemListSectionId { get }
|
||||
var tag: ItemListItemTag? { get }
|
||||
var isAlwaysPlain: Bool { get }
|
||||
var requestsNoInset: Bool { get }
|
||||
}
|
||||
|
||||
extension ItemListItem {
|
||||
var isAlwaysPlain: Bool {
|
||||
public extension ItemListItem {
|
||||
public var isAlwaysPlain: Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
var tag: ItemListItemTag? {
|
||||
public var tag: ItemListItemTag? {
|
||||
return nil
|
||||
}
|
||||
|
||||
var requestsNoInset: Bool {
|
||||
public var requestsNoInset: Bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
protocol ItemListItemNode {
|
||||
public protocol ItemListItemNode {
|
||||
var tag: ItemListItemTag? { get }
|
||||
}
|
||||
|
||||
protocol ItemListItemFocusableNode {
|
||||
public protocol ItemListItemFocusableNode {
|
||||
func focus()
|
||||
}
|
||||
|
||||
enum ItemListInsetWithOtherSection {
|
||||
public enum ItemListInsetWithOtherSection {
|
||||
case none
|
||||
case full
|
||||
case reduced
|
||||
}
|
||||
|
||||
enum ItemListNeighbor {
|
||||
public enum ItemListNeighbor {
|
||||
case none
|
||||
case otherSection(ItemListInsetWithOtherSection)
|
||||
case sameSection(alwaysPlain: Bool)
|
||||
}
|
||||
|
||||
struct ItemListNeighbors {
|
||||
var top: ItemListNeighbor
|
||||
var bottom: ItemListNeighbor
|
||||
public struct ItemListNeighbors {
|
||||
public var top: ItemListNeighbor
|
||||
public var bottom: ItemListNeighbor
|
||||
|
||||
public init(top: ItemListNeighbor, bottom: ItemListNeighbor) {
|
||||
self.top = top
|
||||
self.bottom = bottom
|
||||
}
|
||||
}
|
||||
|
||||
func itemListNeighbors(item: ItemListItem, topItem: ItemListItem?, bottomItem: ItemListItem?) -> ItemListNeighbors {
|
||||
public func itemListNeighbors(item: ItemListItem, topItem: ItemListItem?, bottomItem: ItemListItem?) -> ItemListNeighbors {
|
||||
let topNeighbor: ItemListNeighbor
|
||||
if let topItem = topItem {
|
||||
if topItem.sectionId != item.sectionId {
|
||||
|
|
@ -90,50 +95,50 @@ func itemListNeighbors(item: ItemListItem, topItem: ItemListItem?, bottomItem: I
|
|||
} else {
|
||||
bottomNeighbor = .none
|
||||
}
|
||||
|
||||
|
||||
return ItemListNeighbors(top: topNeighbor, bottom: bottomNeighbor)
|
||||
}
|
||||
|
||||
func itemListNeighborsPlainInsets(_ neighbors: ItemListNeighbors) -> UIEdgeInsets {
|
||||
public func itemListNeighborsPlainInsets(_ neighbors: ItemListNeighbors) -> UIEdgeInsets {
|
||||
var insets = UIEdgeInsets()
|
||||
switch neighbors.top {
|
||||
case .otherSection:
|
||||
insets.top += 22.0
|
||||
case .none, .sameSection:
|
||||
break
|
||||
case .otherSection:
|
||||
insets.top += 22.0
|
||||
case .none, .sameSection:
|
||||
break
|
||||
}
|
||||
switch neighbors.bottom {
|
||||
case .none:
|
||||
insets.bottom += 22.0
|
||||
case .otherSection, .sameSection:
|
||||
break
|
||||
case .none:
|
||||
insets.bottom += 22.0
|
||||
case .otherSection, .sameSection:
|
||||
break
|
||||
}
|
||||
return insets
|
||||
}
|
||||
|
||||
func itemListNeighborsGroupedInsets(_ neighbors: ItemListNeighbors) -> UIEdgeInsets {
|
||||
public func itemListNeighborsGroupedInsets(_ neighbors: ItemListNeighbors) -> UIEdgeInsets {
|
||||
let topInset: CGFloat
|
||||
switch neighbors.top {
|
||||
case .none:
|
||||
topInset = UIScreenPixel + 35.0
|
||||
case .sameSection:
|
||||
topInset = 0.0
|
||||
case let .otherSection(otherInset):
|
||||
switch otherInset {
|
||||
case .none:
|
||||
topInset = UIScreenPixel + 35.0
|
||||
case .sameSection:
|
||||
topInset = 0.0
|
||||
case let .otherSection(otherInset):
|
||||
switch otherInset {
|
||||
case .none:
|
||||
topInset = 0.0
|
||||
case .full:
|
||||
topInset = UIScreenPixel + 35.0
|
||||
case .reduced:
|
||||
topInset = UIScreenPixel + 16.0
|
||||
}
|
||||
case .full:
|
||||
topInset = UIScreenPixel + 35.0
|
||||
case .reduced:
|
||||
topInset = UIScreenPixel + 16.0
|
||||
}
|
||||
}
|
||||
let bottomInset: CGFloat
|
||||
switch neighbors.bottom {
|
||||
case .sameSection, .otherSection:
|
||||
bottomInset = 0.0
|
||||
case .none:
|
||||
bottomInset = UIScreenPixel + 35.0
|
||||
case .sameSection, .otherSection:
|
||||
bottomInset = 0.0
|
||||
case .none:
|
||||
bottomInset = UIScreenPixel + 35.0
|
||||
}
|
||||
return UIEdgeInsets(top: topInset, left: 0.0, bottom: bottomInset, right: 0.0)
|
||||
}
|
||||
|
|
@ -3,19 +3,20 @@ import UIKit
|
|||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
import ActivityIndicator
|
||||
|
||||
final class ItemListLoadingIndicatorEmptyStateItem: ItemListControllerEmptyStateItem {
|
||||
public final class ItemListLoadingIndicatorEmptyStateItem: ItemListControllerEmptyStateItem {
|
||||
let theme: PresentationTheme
|
||||
|
||||
init(theme: PresentationTheme) {
|
||||
public init(theme: PresentationTheme) {
|
||||
self.theme = theme
|
||||
}
|
||||
|
||||
func isEqual(to: ItemListControllerEmptyStateItem) -> Bool {
|
||||
public func isEqual(to: ItemListControllerEmptyStateItem) -> Bool {
|
||||
return to is ItemListLoadingIndicatorEmptyStateItem
|
||||
}
|
||||
|
||||
func node(current: ItemListControllerEmptyStateItemNode?) -> ItemListControllerEmptyStateItemNode {
|
||||
public func node(current: ItemListControllerEmptyStateItemNode?) -> ItemListControllerEmptyStateItemNode {
|
||||
if let current = current as? ItemListLoadingIndicatorEmptyStateItemNode {
|
||||
current.theme = self.theme
|
||||
return current
|
||||
|
|
@ -25,8 +26,8 @@ final class ItemListLoadingIndicatorEmptyStateItem: ItemListControllerEmptyState
|
|||
}
|
||||
}
|
||||
|
||||
final class ItemListLoadingIndicatorEmptyStateItemNode: ItemListControllerEmptyStateItemNode {
|
||||
var theme: PresentationTheme {
|
||||
public final class ItemListLoadingIndicatorEmptyStateItemNode: ItemListControllerEmptyStateItemNode {
|
||||
public var theme: PresentationTheme {
|
||||
didSet {
|
||||
self.indicator.type = .custom(self.theme.list.itemAccentColor, 40.0, 2.0, false)
|
||||
}
|
||||
|
|
@ -35,7 +36,7 @@ final class ItemListLoadingIndicatorEmptyStateItemNode: ItemListControllerEmptyS
|
|||
|
||||
private var validLayout: (ContainerViewLayout, CGFloat)?
|
||||
|
||||
init(theme: PresentationTheme) {
|
||||
public init(theme: PresentationTheme) {
|
||||
self.theme = theme
|
||||
self.indicator = ActivityIndicator(type: .custom(theme.list.itemAccentColor, 22.0, 2.0, false))
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ final class ItemListLoadingIndicatorEmptyStateItemNode: ItemListControllerEmptyS
|
|||
self.addSubnode(self.indicator)
|
||||
}
|
||||
|
||||
override func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
override public func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
self.validLayout = (layout, navigationBarHeight)
|
||||
|
||||
var insets = layout.insets(options: [.statusBar])
|
||||
|
|
@ -2,44 +2,53 @@ import Foundation
|
|||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import AnimationUI
|
||||
|
||||
enum ItemListRevealOptionIcon: Equatable {
|
||||
public enum ItemListRevealOptionIcon: Equatable {
|
||||
case none
|
||||
case image(image: UIImage)
|
||||
case animation(animation: String, scale: CGFloat, offset: CGFloat, keysToColor: [String]?, flip: Bool)
|
||||
|
||||
public static func ==(lhs: ItemListRevealOptionIcon, rhs: ItemListRevealOptionIcon) -> Bool {
|
||||
switch lhs {
|
||||
case .none:
|
||||
if case .none = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .image(lhsImage):
|
||||
if case let .image(rhsImage) = rhs, lhsImage == rhsImage {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .animation(lhsAnimation, lhsScale, lhsOffset, lhsKeysToColor, lhsFlip):
|
||||
if case let .animation(rhsAnimation, rhsScale, rhsOffset, rhsKeysToColor, rhsFlip) = rhs, lhsAnimation == rhsAnimation, lhsScale == rhsScale, lhsOffset == rhsOffset, lhsKeysToColor == rhsKeysToColor, lhsFlip == rhsFlip {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .none:
|
||||
if case .none = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .image(lhsImage):
|
||||
if case let .image(rhsImage) = rhs, lhsImage == rhsImage {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .animation(lhsAnimation, lhsScale, lhsOffset, lhsKeysToColor, lhsFlip):
|
||||
if case let .animation(rhsAnimation, rhsScale, rhsOffset, rhsKeysToColor, rhsFlip) = rhs, lhsAnimation == rhsAnimation, lhsScale == rhsScale, lhsOffset == rhsOffset, lhsKeysToColor == rhsKeysToColor, lhsFlip == rhsFlip {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ItemListRevealOption: Equatable {
|
||||
let key: Int32
|
||||
let title: String
|
||||
let icon: ItemListRevealOptionIcon
|
||||
let color: UIColor
|
||||
let textColor: UIColor
|
||||
public struct ItemListRevealOption: Equatable {
|
||||
public let key: Int32
|
||||
public let title: String
|
||||
public let icon: ItemListRevealOptionIcon
|
||||
public let color: UIColor
|
||||
public let textColor: UIColor
|
||||
|
||||
static func ==(lhs: ItemListRevealOption, rhs: ItemListRevealOption) -> Bool {
|
||||
public init(key: Int32, title: String, icon: ItemListRevealOptionIcon, color: UIColor, textColor: UIColor) {
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.icon = icon
|
||||
self.color = color
|
||||
self.textColor = textColor
|
||||
}
|
||||
|
||||
public static func ==(lhs: ItemListRevealOption, rhs: ItemListRevealOption) -> Bool {
|
||||
if lhs.key != rhs.key {
|
||||
return false
|
||||
}
|
||||
|
|
@ -86,33 +95,33 @@ private final class ItemListRevealOptionNode: ASDisplayNode {
|
|||
self.titleNode.attributedText = NSAttributedString(string: title, font: icon == .none ? titleFontWithoutIcon : titleFontWithIcon, textColor: textColor)
|
||||
|
||||
switch icon {
|
||||
case let .image(image):
|
||||
let iconNode = ASImageNode()
|
||||
iconNode.image = generateTintedImage(image: image, color: textColor)
|
||||
self.iconNode = iconNode
|
||||
self.animationNode = nil
|
||||
case let .image(image):
|
||||
let iconNode = ASImageNode()
|
||||
iconNode.image = generateTintedImage(image: image, color: textColor)
|
||||
self.iconNode = iconNode
|
||||
self.animationNode = nil
|
||||
|
||||
case let .animation(animation, scale, offset, keysToColor, flip):
|
||||
self.iconNode = nil
|
||||
var colors: [String: UIColor] = [:]
|
||||
if let keysToColor = keysToColor {
|
||||
for key in keysToColor {
|
||||
colors[key] = color
|
||||
}
|
||||
case let .animation(animation, scale, offset, keysToColor, flip):
|
||||
self.iconNode = nil
|
||||
var colors: [String: UIColor] = [:]
|
||||
if let keysToColor = keysToColor {
|
||||
for key in keysToColor {
|
||||
colors[key] = color
|
||||
}
|
||||
self.animationNode = AnimationNode(animation: animation, colors: colors, scale: scale)
|
||||
if flip {
|
||||
self.animationNode!.transform = CATransform3DMakeScale(1.0, -1.0, 1.0)
|
||||
}
|
||||
self.animationNodeOffset = offset
|
||||
self.animationNodeFlip = flip
|
||||
break
|
||||
}
|
||||
self.animationNode = AnimationNode(animation: animation, colors: colors, scale: scale)
|
||||
if flip {
|
||||
self.animationNode!.transform = CATransform3DMakeScale(1.0, -1.0, 1.0)
|
||||
}
|
||||
self.animationNodeOffset = offset
|
||||
self.animationNodeFlip = flip
|
||||
break
|
||||
|
||||
case .none:
|
||||
self.iconNode = nil
|
||||
self.animationNode = nil
|
||||
case .none:
|
||||
self.iconNode = nil
|
||||
self.animationNode = nil
|
||||
}
|
||||
|
||||
|
||||
super.init()
|
||||
|
||||
self.addSubnode(self.backgroundNode)
|
||||
|
|
@ -129,7 +138,7 @@ private final class ItemListRevealOptionNode: ASDisplayNode {
|
|||
func setHighlighted(_ highlighted: Bool) {
|
||||
if highlighted {
|
||||
self.insertSubnode(self.highlightNode, aboveSubnode: self.backgroundNode)
|
||||
self.highlightNode.layer.animate(from: 0.0 as NSNumber, to: 1.0 as NSNumber, keyPath: "opacity", timingFunction: kCAMediaTimingFunctionEaseInEaseOut, duration: 0.3)
|
||||
self.highlightNode.layer.animate(from: 0.0 as NSNumber, to: 1.0 as NSNumber, keyPath: "opacity", timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, duration: 0.3)
|
||||
self.highlightNode.alpha = 1.0
|
||||
} else {
|
||||
self.highlightNode.removeFromSupernode()
|
||||
|
|
@ -177,10 +186,10 @@ private final class ItemListRevealOptionNode: ASDisplayNode {
|
|||
let titleSize = self.titleNode.calculatedSize
|
||||
var contentRect = CGRect(origin: CGPoint(), size: baseSize)
|
||||
switch alignment {
|
||||
case .left:
|
||||
contentRect.origin.x = 0.0
|
||||
case .right:
|
||||
contentRect.origin.x = extendedWidth - contentRect.width
|
||||
case .left:
|
||||
contentRect.origin.x = 0.0
|
||||
case .right:
|
||||
contentRect.origin.x = extendedWidth - contentRect.width
|
||||
}
|
||||
|
||||
if let animationNode = self.animationNode, let imageSize = animationNode.preferredSize() {
|
||||
|
|
@ -251,7 +260,7 @@ private final class ItemListRevealOptionNode: ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
final class ItemListRevealOptionsNode: ASDisplayNode {
|
||||
public final class ItemListRevealOptionsNode: ASDisplayNode {
|
||||
private let optionSelected: (ItemListRevealOption) -> Void
|
||||
private let tapticAction: () -> Void
|
||||
|
||||
|
|
@ -262,14 +271,14 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
private var revealOffset: CGFloat = 0.0
|
||||
private var sideInset: CGFloat = 0.0
|
||||
|
||||
init(optionSelected: @escaping (ItemListRevealOption) -> Void, tapticAction: @escaping () -> Void) {
|
||||
public init(optionSelected: @escaping (ItemListRevealOption) -> Void, tapticAction: @escaping () -> Void) {
|
||||
self.optionSelected = optionSelected
|
||||
self.tapticAction = tapticAction
|
||||
|
||||
super.init()
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let gestureRecognizer = TapLongTapOrDoubleTapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:)))
|
||||
|
|
@ -290,7 +299,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
self.view.addGestureRecognizer(gestureRecognizer)
|
||||
}
|
||||
|
||||
func setOptions(_ options: [ItemListRevealOption], isLeft: Bool) {
|
||||
public func setOptions(_ options: [ItemListRevealOption], isLeft: Bool) {
|
||||
if self.options != options || self.isLeft != isLeft {
|
||||
self.options = options
|
||||
self.isLeft = isLeft
|
||||
|
|
@ -313,7 +322,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
var maxWidth: CGFloat = 0.0
|
||||
for node in self.optionNodes {
|
||||
let nodeSize = node.measure(constrainedSize)
|
||||
|
|
@ -322,7 +331,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
return CGSize(width: maxWidth * CGFloat(self.optionNodes.count), height: constrainedSize.height)
|
||||
}
|
||||
|
||||
func updateRevealOffset(offset: CGFloat, sideInset: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
public func updateRevealOffset(offset: CGFloat, sideInset: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
self.revealOffset = offset
|
||||
self.sideInset = sideInset
|
||||
self.updateNodesLayout(transition: transition)
|
||||
|
|
@ -363,7 +372,6 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
while i >= 0 && i < self.optionNodes.count {
|
||||
let node = self.optionNodes[i]
|
||||
let nodeWidth = i == (self.optionNodes.count - 1) ? lastNodeWidth : basicNodeWidth
|
||||
let defaultAlignment: ItemListRevealOptionAlignment = self.isLeft ? .right : .left
|
||||
var nodeTransition = transition
|
||||
var isExpanded = false
|
||||
if (self.isLeft && i == 0) || (!self.isLeft && i == self.optionNodes.count - 1) {
|
||||
|
|
@ -401,7 +409,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
transition.updateFrame(node: node, frame: CGRect(origin: CGPoint(x: nodeLeftOffset, y: 0.0), size: CGSize(width: extendedWidth, height: size.height)), completion: { _ in
|
||||
completionCount -= 1
|
||||
intermediateCompletion()
|
||||
|
||||
|
||||
})
|
||||
|
||||
var nodeAlignment: ItemListRevealOptionAlignment
|
||||
|
|
@ -425,7 +433,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func tapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
@objc private func tapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
if case .ended = recognizer.state, let gesture = recognizer.lastRecognizedGestureAndLocation?.0, case .tap = gesture {
|
||||
let location = recognizer.location(in: self.view)
|
||||
var selectedOption: Int?
|
||||
|
|
@ -449,7 +457,7 @@ final class ItemListRevealOptionsNode: ASDisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
func isDisplayingExtendedAction() -> Bool {
|
||||
public func isDisplayingExtendedAction() -> Bool {
|
||||
return self.optionNodes.contains(where: { $0.isExpanded })
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,12 @@ import Foundation
|
|||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import CheckNode
|
||||
|
||||
final class ItemListSelectableControlNode: ASDisplayNode {
|
||||
public final class ItemListSelectableControlNode: ASDisplayNode {
|
||||
private let checkNode: CheckNode
|
||||
|
||||
init(strokeColor: UIColor, fillColor: UIColor, foregroundColor: UIColor) {
|
||||
public init(strokeColor: UIColor, fillColor: UIColor, foregroundColor: UIColor) {
|
||||
self.checkNode = CheckNode(strokeColor: strokeColor, fillColor: fillColor, foregroundColor: foregroundColor, style: .plain)
|
||||
self.checkNode.isUserInteractionEnabled = false
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ final class ItemListSelectableControlNode: ASDisplayNode {
|
|||
self.addSubnode(self.checkNode)
|
||||
}
|
||||
|
||||
static func asyncLayout(_ node: ItemListSelectableControlNode?) -> (_ strokeColor: UIColor, _ fillColor: UIColor, _ foregroundColor: UIColor, _ selected: Bool, _ compact: Bool) -> (CGFloat, (CGSize, Bool) -> ItemListSelectableControlNode) {
|
||||
public static func asyncLayout(_ node: ItemListSelectableControlNode?) -> (_ strokeColor: UIColor, _ fillColor: UIColor, _ foregroundColor: UIColor, _ selected: Bool, _ compact: Bool) -> (CGFloat, (CGSize, Bool) -> ItemListSelectableControlNode) {
|
||||
return { strokeColor, fillColor, foregroundColor, selected, compact in
|
||||
let resultNode: ItemListSelectableControlNode
|
||||
if let node = node {
|
||||
19
submodules/ItemListUI/Sources/ItemListUI.h
Normal file
19
submodules/ItemListUI/Sources/ItemListUI.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// ItemListUI.h
|
||||
// ItemListUI
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for ItemListUI.
|
||||
FOUNDATION_EXPORT double ItemListUIVersionNumber;
|
||||
|
||||
//! Project version string for ItemListUI.
|
||||
FOUNDATION_EXPORT const unsigned char ItemListUIVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ItemListUI/PublicHeader.h>
|
||||
|
||||
|
||||
|
|
@ -5,31 +5,31 @@ import AsyncDisplayKit
|
|||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
||||
enum ItemListActionKind {
|
||||
public enum ItemListActionKind {
|
||||
case generic
|
||||
case destructive
|
||||
case neutral
|
||||
case disabled
|
||||
}
|
||||
|
||||
enum ItemListActionAlignment {
|
||||
public enum ItemListActionAlignment {
|
||||
case natural
|
||||
case center
|
||||
}
|
||||
|
||||
class ItemListActionItem: ListViewItem, ItemListItem {
|
||||
public class ItemListActionItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let title: String
|
||||
let kind: ItemListActionKind
|
||||
let alignment: ItemListActionAlignment
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let style: ItemListStyle
|
||||
let action: () -> Void
|
||||
public let action: () -> Void
|
||||
let longTapAction: (() -> Void)?
|
||||
let clearHighlightAutomatically: Bool
|
||||
let tag: Any?
|
||||
public let tag: Any?
|
||||
|
||||
init(theme: PresentationTheme, title: String, kind: ItemListActionKind, alignment: ItemListActionAlignment, sectionId: ItemListSectionId, style: ItemListStyle, action: @escaping () -> Void, longTapAction: (() -> Void)? = nil, clearHighlightAutomatically: Bool = true, tag: Any? = nil) {
|
||||
public init(theme: PresentationTheme, title: String, kind: ItemListActionKind, alignment: ItemListActionAlignment, sectionId: ItemListSectionId, style: ItemListStyle, action: @escaping () -> Void, longTapAction: (() -> Void)? = nil, clearHighlightAutomatically: Bool = true, tag: Any? = nil) {
|
||||
self.theme = theme
|
||||
self.title = title
|
||||
self.kind = kind
|
||||
|
|
@ -42,7 +42,7 @@ class ItemListActionItem: ListViewItem, ItemListItem {
|
|||
self.tag = tag
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListActionItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -58,7 +58,7 @@ class ItemListActionItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListActionItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -75,9 +75,9 @@ class ItemListActionItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
var selectable: Bool = true
|
||||
public var selectable: Bool = true
|
||||
|
||||
func selected(listView: ListView){
|
||||
public func selected(listView: ListView){
|
||||
if self.clearHighlightAutomatically {
|
||||
listView.clearHighlightAnimated(true)
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ class ItemListActionItem: ListViewItem, ItemListItem {
|
|||
|
||||
private let titleFont = Font.regular(17.0)
|
||||
|
||||
class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
||||
public class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -99,11 +99,11 @@ class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
|||
|
||||
private var item: ItemListActionItem?
|
||||
|
||||
var tag: ItemListItemTag? {
|
||||
public var tag: ItemListItemTag? {
|
||||
return self.item?.tag as? ItemListItemTag
|
||||
}
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
self.backgroundNode.backgroundColor = .white
|
||||
|
|
@ -131,7 +131,7 @@ class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
|||
self.addSubnode(self.activateArea)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListActionItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListActionItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTitleLayout = TextNode.asyncLayout(self.titleNode)
|
||||
|
||||
let currentItem = self.item
|
||||
|
|
@ -185,10 +185,10 @@ class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
|||
strongSelf.activateArea.frame = CGRect(origin: CGPoint(x: params.leftInset, y: 0.0), size: CGSize(width: params.width - params.leftInset - params.rightInset, height: layout.contentSize.height))
|
||||
strongSelf.activateArea.accessibilityLabel = item.title
|
||||
|
||||
var accessibilityTraits: UIAccessibilityTraits = UIAccessibilityTraitButton
|
||||
var accessibilityTraits: UIAccessibilityTraits = .button
|
||||
switch item.kind {
|
||||
case .disabled:
|
||||
accessibilityTraits |= UIAccessibilityTraitNotEnabled
|
||||
accessibilityTraits.insert(.notEnabled)
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted && self.item?.kind != ItemListActionKind.disabled {
|
||||
|
|
@ -300,19 +300,19 @@ class ItemListActionItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
override func longTapped() {
|
||||
override public func longTapped() {
|
||||
self.item?.longTapAction?()
|
||||
}
|
||||
|
||||
override var canBeLongTapped: Bool {
|
||||
override public var canBeLongTapped: Bool {
|
||||
return self.item?.longTapAction != nil
|
||||
}
|
||||
}
|
||||
|
|
@ -4,23 +4,24 @@ import Display
|
|||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import ActivityIndicator
|
||||
|
||||
class ItemListActivityTextItem: ListViewItem, ItemListItem {
|
||||
public class ItemListActivityTextItem: ListViewItem, ItemListItem {
|
||||
let displayActivity: Bool
|
||||
let theme: PresentationTheme
|
||||
let text: NSAttributedString
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
|
||||
let isAlwaysPlain: Bool = true
|
||||
public let isAlwaysPlain: Bool = true
|
||||
|
||||
init(displayActivity: Bool, theme: PresentationTheme, text: NSAttributedString, sectionId: ItemListSectionId) {
|
||||
public init(displayActivity: Bool, theme: PresentationTheme, text: NSAttributedString, sectionId: ItemListSectionId) {
|
||||
self.displayActivity = displayActivity
|
||||
self.theme = theme
|
||||
self.text = text
|
||||
self.sectionId = sectionId
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListActivityTextItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -36,7 +37,7 @@ class ItemListActivityTextItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
guard let nodeValue = node() as? ItemListActivityTextItemNode else {
|
||||
assertionFailure()
|
||||
|
|
@ -59,13 +60,13 @@ class ItemListActivityTextItem: ListViewItem, ItemListItem {
|
|||
|
||||
private let titleFont = Font.regular(14.0)
|
||||
|
||||
class ItemListActivityTextItemNode: ListViewItemNode {
|
||||
public class ItemListActivityTextItemNode: ListViewItemNode {
|
||||
private let titleNode: TextNode
|
||||
private let activityIndicator: ActivityIndicator
|
||||
|
||||
private var item: ItemListActivityTextItem?
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.titleNode = TextNode()
|
||||
self.titleNode.isUserInteractionEnabled = false
|
||||
self.titleNode.contentMode = .left
|
||||
|
|
@ -79,7 +80,7 @@ class ItemListActivityTextItemNode: ListViewItemNode {
|
|||
self.addSubnode(self.activityIndicator)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListActivityTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListActivityTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTitleLayout = TextNode.asyncLayout(self.titleNode)
|
||||
|
||||
return { item, params, neighbors in
|
||||
|
|
@ -94,8 +95,8 @@ class ItemListActivityTextItemNode: ListViewItemNode {
|
|||
let titleString = NSMutableAttributedString(attributedString: item.text)
|
||||
let hasFont = titleString.attribute(.font, at: 0, effectiveRange: nil) != nil
|
||||
if !hasFont {
|
||||
titleString.removeAttribute(NSAttributedStringKey.font, range: NSMakeRange(0, titleString.length))
|
||||
titleString.addAttributes([NSAttributedStringKey.font: titleFont], range: NSMakeRange(0, titleString.length))
|
||||
titleString.removeAttribute(NSAttributedString.Key.font, range: NSMakeRange(0, titleString.length))
|
||||
titleString.addAttributes([NSAttributedString.Key.font: titleFont], range: NSMakeRange(0, titleString.length))
|
||||
}
|
||||
|
||||
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: titleString, backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: params.width - params.rightInset - 20.0 - 22.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: TextNodeCutout(topLeft: CGSize(width: activityWidth, height: 4.0)), insets: UIEdgeInsets()))
|
||||
|
|
@ -129,11 +130,11 @@ class ItemListActivityTextItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,27 +5,27 @@ import AsyncDisplayKit
|
|||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
||||
enum ItemListCheckboxItemStyle {
|
||||
public enum ItemListCheckboxItemStyle {
|
||||
case left
|
||||
case right
|
||||
}
|
||||
|
||||
enum ItemListCheckboxItemColor {
|
||||
public enum ItemListCheckboxItemColor {
|
||||
case accent
|
||||
case secondary
|
||||
}
|
||||
|
||||
class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
||||
public class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let title: String
|
||||
let style: ItemListCheckboxItemStyle
|
||||
let color: ItemListCheckboxItemColor
|
||||
let checked: Bool
|
||||
let zeroSeparatorInsets: Bool
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let action: () -> Void
|
||||
|
||||
init(theme: PresentationTheme, title: String, style: ItemListCheckboxItemStyle, color: ItemListCheckboxItemColor = .accent, checked: Bool, zeroSeparatorInsets: Bool, sectionId: ItemListSectionId, action: @escaping () -> Void) {
|
||||
public init(theme: PresentationTheme, title: String, style: ItemListCheckboxItemStyle, color: ItemListCheckboxItemColor = .accent, checked: Bool, zeroSeparatorInsets: Bool, sectionId: ItemListSectionId, action: @escaping () -> Void) {
|
||||
self.theme = theme
|
||||
self.title = title
|
||||
self.style = style
|
||||
|
|
@ -36,7 +36,7 @@ class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
|||
self.action = action
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListCheckboxItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -52,7 +52,7 @@ class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListCheckboxItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -69,9 +69,9 @@ class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
var selectable: Bool = true
|
||||
public var selectable: Bool = true
|
||||
|
||||
func selected(listView: ListView){
|
||||
public func selected(listView: ListView){
|
||||
listView.clearHighlightAnimated(true)
|
||||
self.action()
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ class ItemListCheckboxItem: ListViewItem, ItemListItem {
|
|||
|
||||
private let titleFont = Font.regular(17.0)
|
||||
|
||||
class ItemListCheckboxItemNode: ListViewItemNode {
|
||||
public class ItemListCheckboxItemNode: ListViewItemNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -92,7 +92,7 @@ class ItemListCheckboxItemNode: ListViewItemNode {
|
|||
|
||||
private var item: ItemListCheckboxItem?
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class ItemListCheckboxItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListCheckboxItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListCheckboxItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTitleLayout = TextNode.asyncLayout(self.titleNode)
|
||||
|
||||
let currentItem = self.item
|
||||
|
|
@ -243,7 +243,7 @@ class ItemListCheckboxItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted {
|
||||
|
|
@ -281,11 +281,11 @@ class ItemListCheckboxItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,17 +5,17 @@ import AsyncDisplayKit
|
|||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
||||
enum ItemListDisclosureItemTitleColor {
|
||||
public enum ItemListDisclosureItemTitleColor {
|
||||
case primary
|
||||
case accent
|
||||
}
|
||||
|
||||
enum ItemListDisclosureStyle {
|
||||
public enum ItemListDisclosureStyle {
|
||||
case arrow
|
||||
case none
|
||||
}
|
||||
|
||||
enum ItemListDisclosureLabelStyle {
|
||||
public enum ItemListDisclosureLabelStyle {
|
||||
case text
|
||||
case detailText
|
||||
case multilineDetailText
|
||||
|
|
@ -23,7 +23,7 @@ enum ItemListDisclosureLabelStyle {
|
|||
case color(UIColor)
|
||||
}
|
||||
|
||||
class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
||||
public class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let icon: UIImage?
|
||||
let title: String
|
||||
|
|
@ -31,14 +31,14 @@ class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
|||
let enabled: Bool
|
||||
let label: String
|
||||
let labelStyle: ItemListDisclosureLabelStyle
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let style: ItemListStyle
|
||||
let disclosureStyle: ItemListDisclosureStyle
|
||||
let action: (() -> Void)?
|
||||
let clearHighlightAutomatically: Bool
|
||||
let tag: ItemListItemTag?
|
||||
public let tag: ItemListItemTag?
|
||||
|
||||
init(theme: PresentationTheme, icon: UIImage? = nil, title: String, enabled: Bool = true, titleColor: ItemListDisclosureItemTitleColor = .primary, label: String, labelStyle: ItemListDisclosureLabelStyle = .text, sectionId: ItemListSectionId, style: ItemListStyle, disclosureStyle: ItemListDisclosureStyle = .arrow, action: (() -> Void)?, clearHighlightAutomatically: Bool = true, tag: ItemListItemTag? = nil) {
|
||||
public init(theme: PresentationTheme, icon: UIImage? = nil, title: String, enabled: Bool = true, titleColor: ItemListDisclosureItemTitleColor = .primary, label: String, labelStyle: ItemListDisclosureLabelStyle = .text, sectionId: ItemListSectionId, style: ItemListStyle, disclosureStyle: ItemListDisclosureStyle = .arrow, action: (() -> Void)?, clearHighlightAutomatically: Bool = true, tag: ItemListItemTag? = nil) {
|
||||
self.theme = theme
|
||||
self.icon = icon
|
||||
self.title = title
|
||||
|
|
@ -54,7 +54,7 @@ class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
|||
self.tag = tag
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListDisclosureItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -70,7 +70,7 @@ class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListDisclosureItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -87,9 +87,9 @@ class ItemListDisclosureItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
var selectable: Bool = true
|
||||
public var selectable: Bool = true
|
||||
|
||||
func selected(listView: ListView){
|
||||
public func selected(listView: ListView){
|
||||
if self.clearHighlightAutomatically {
|
||||
listView.clearHighlightAnimated(true)
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ private let titleFont = Font.regular(17.0)
|
|||
private let badgeFont = Font.regular(15.0)
|
||||
private let detailFont = Font.regular(13.0)
|
||||
|
||||
class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
||||
public class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -120,7 +120,7 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
|
||||
private var item: ItemListDisclosureItem?
|
||||
|
||||
override var canBeSelected: Bool {
|
||||
override public var canBeSelected: Bool {
|
||||
if let item = self.item, let _ = item.action {
|
||||
return true
|
||||
} else {
|
||||
|
|
@ -128,11 +128,11 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
var tag: ItemListItemTag? {
|
||||
public var tag: ItemListItemTag? {
|
||||
return self.item?.tag
|
||||
}
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
self.backgroundNode.backgroundColor = .white
|
||||
|
|
@ -178,7 +178,7 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
self.addSubnode(self.activateArea)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListDisclosureItem, _ params: ListViewItemLayoutParams, _ insets: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListDisclosureItem, _ params: ListViewItemLayoutParams, _ insets: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTitleLayout = TextNode.asyncLayout(self.titleNode)
|
||||
let makeLabelLayout = TextNode.asyncLayout(self.labelNode)
|
||||
|
||||
|
|
@ -308,9 +308,9 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
strongSelf.activateArea.accessibilityLabel = item.title
|
||||
strongSelf.activateArea.accessibilityValue = item.label
|
||||
if item.enabled {
|
||||
strongSelf.activateArea.accessibilityTraits = 0
|
||||
strongSelf.activateArea.accessibilityTraits = []
|
||||
} else {
|
||||
strongSelf.activateArea.accessibilityTraits = UIAccessibilityTraitNotEnabled
|
||||
strongSelf.activateArea.accessibilityTraits = .notEnabled
|
||||
}
|
||||
|
||||
if let icon = item.icon {
|
||||
|
|
@ -447,7 +447,7 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted && (self.item?.enabled ?? false) {
|
||||
|
|
@ -485,15 +485,15 @@ class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateAdded(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateAdded(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
|
@ -3,37 +3,37 @@ import UIKit
|
|||
import Display
|
||||
import AsyncDisplayKit
|
||||
|
||||
final class ItemListRevealOptionsGestureRecognizer: UIPanGestureRecognizer {
|
||||
var validatedGesture = false
|
||||
var firstLocation: CGPoint = CGPoint()
|
||||
public final class ItemListRevealOptionsGestureRecognizer: UIPanGestureRecognizer {
|
||||
public var validatedGesture = false
|
||||
public var firstLocation: CGPoint = CGPoint()
|
||||
|
||||
var allowAnyDirection = false
|
||||
var lastVelocity: CGPoint = CGPoint()
|
||||
public var allowAnyDirection = false
|
||||
public var lastVelocity: CGPoint = CGPoint()
|
||||
|
||||
override init(target: Any?, action: Selector?) {
|
||||
override public init(target: Any?, action: Selector?) {
|
||||
super.init(target: target, action: action)
|
||||
|
||||
self.maximumNumberOfTouches = 1
|
||||
}
|
||||
|
||||
override func reset() {
|
||||
override public func reset() {
|
||||
super.reset()
|
||||
|
||||
self.validatedGesture = false
|
||||
}
|
||||
|
||||
func becomeCancelled() {
|
||||
public func becomeCancelled() {
|
||||
self.state = .cancelled
|
||||
}
|
||||
|
||||
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent) {
|
||||
override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent) {
|
||||
super.touchesBegan(touches, with: event)
|
||||
|
||||
let touch = touches.first!
|
||||
self.firstLocation = touch.location(in: self.view)
|
||||
}
|
||||
|
||||
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent) {
|
||||
override public func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent) {
|
||||
let location = touches.first!.location(in: self.view)
|
||||
let translation = CGPoint(x: location.x - self.firstLocation.x, y: location.y - self.firstLocation.y)
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ final class ItemListRevealOptionsGestureRecognizer: UIPanGestureRecognizer {
|
|||
}
|
||||
}
|
||||
|
||||
class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelegate {
|
||||
open class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelegate {
|
||||
private var validLayout: (CGSize, CGFloat, CGFloat)?
|
||||
|
||||
private var leftRevealNode: ItemListRevealOptionsNode?
|
||||
|
|
@ -62,7 +62,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
private var revealOptions: (left: [ItemListRevealOption], right: [ItemListRevealOption]) = ([], [])
|
||||
|
||||
private var initialRevealOffset: CGFloat = 0.0
|
||||
private(set) var revealOffset: CGFloat = 0.0
|
||||
public private(set) var revealOffset: CGFloat = 0.0
|
||||
|
||||
private var recognizer: ItemListRevealOptionsGestureRecognizer?
|
||||
private var tapRecognizer: UITapGestureRecognizer?
|
||||
|
|
@ -70,19 +70,19 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
|
||||
private var allowAnyDirection = false
|
||||
|
||||
var isDisplayingRevealedOptions: Bool {
|
||||
public var isDisplayingRevealedOptions: Bool {
|
||||
return !self.revealOffset.isZero
|
||||
}
|
||||
|
||||
override var canBeSelected: Bool {
|
||||
override open var canBeSelected: Bool {
|
||||
return !self.isDisplayingRevealedOptions
|
||||
}
|
||||
|
||||
override init(layerBacked: Bool, dynamicBounce: Bool, rotated: Bool, seeThrough: Bool) {
|
||||
override public init(layerBacked: Bool, dynamicBounce: Bool, rotated: Bool, seeThrough: Bool) {
|
||||
super.init(layerBacked: layerBacked, dynamicBounce: dynamicBounce, rotated: rotated, seeThrough: seeThrough)
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override open func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let recognizer = ItemListRevealOptionsGestureRecognizer(target: self, action: #selector(self.revealGesture(_:)))
|
||||
|
|
@ -98,7 +98,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
self.view.disablesInteractiveTransitionGestureRecognizer = self.allowAnyDirection
|
||||
}
|
||||
|
||||
func setRevealOptions(_ options: (left: [ItemListRevealOption], right: [ItemListRevealOption])) {
|
||||
open func setRevealOptions(_ options: (left: [ItemListRevealOption], right: [ItemListRevealOption])) {
|
||||
if self.revealOptions == options {
|
||||
return
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
override open func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
if let recognizer = self.recognizer, gestureRecognizer == self.tapRecognizer {
|
||||
return abs(self.revealOffset) > 0.0 && !recognizer.validatedGesture
|
||||
} else {
|
||||
|
|
@ -151,7 +151,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
open func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
if let recognizer = self.recognizer, otherGestureRecognizer == recognizer {
|
||||
return true
|
||||
} else {
|
||||
|
|
@ -159,14 +159,14 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
@objc func revealTapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
@objc private func revealTapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
if case .ended = recognizer.state {
|
||||
self.updateRevealOffsetInternal(offset: 0.0, transition: .animated(duration: 0.3, curve: .spring))
|
||||
self.revealOptionsInteractivelyClosed()
|
||||
}
|
||||
}
|
||||
|
||||
@objc func revealGesture(_ recognizer: ItemListRevealOptionsGestureRecognizer) {
|
||||
@objc private func revealGesture(_ recognizer: ItemListRevealOptionsGestureRecognizer) {
|
||||
guard let (size, _, _) = self.validLayout else {
|
||||
return
|
||||
}
|
||||
|
|
@ -336,7 +336,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
func updateLayout(size: CGSize, leftInset: CGFloat, rightInset: CGFloat) {
|
||||
public func updateLayout(size: CGSize, leftInset: CGFloat, rightInset: CGFloat) {
|
||||
self.validLayout = (size, leftInset, rightInset)
|
||||
|
||||
if let leftRevealNode = self.leftRevealNode {
|
||||
|
|
@ -352,7 +352,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
func updateRevealOffsetInternal(offset: CGFloat, transition: ContainedViewLayoutTransition, completion: (() -> Void)? = nil) {
|
||||
open func updateRevealOffsetInternal(offset: CGFloat, transition: ContainedViewLayoutTransition, completion: (() -> Void)? = nil) {
|
||||
self.revealOffset = offset
|
||||
guard let (size, leftInset, rightInset) = self.validLayout else {
|
||||
return
|
||||
|
|
@ -425,19 +425,19 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
self.updateRevealOffset(offset: offset, transition: transition)
|
||||
}
|
||||
|
||||
func updateRevealOffset(offset: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
open func updateRevealOffset(offset: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
|
||||
}
|
||||
|
||||
func revealOptionsInteractivelyOpened() {
|
||||
open func revealOptionsInteractivelyOpened() {
|
||||
|
||||
}
|
||||
|
||||
func revealOptionsInteractivelyClosed() {
|
||||
open func revealOptionsInteractivelyClosed() {
|
||||
|
||||
}
|
||||
|
||||
func setRevealOptionsOpened(_ value: Bool, animated: Bool) {
|
||||
open func setRevealOptionsOpened(_ value: Bool, animated: Bool) {
|
||||
if value != !self.revealOffset.isZero {
|
||||
if !self.revealOffset.isZero {
|
||||
self.recognizer?.becomeCancelled()
|
||||
|
|
@ -463,7 +463,7 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
func animateRevealOptionsFill(completion: (() -> Void)? = nil) {
|
||||
open func animateRevealOptionsFill(completion: (() -> Void)? = nil) {
|
||||
if let validLayout = self.validLayout {
|
||||
self.layer.allowsGroupOpacity = true
|
||||
self.updateRevealOffsetInternal(offset: -validLayout.0.width - 74.0, transition: .animated(duration: 0.2, curve: .spring), completion: {
|
||||
|
|
@ -473,14 +473,14 @@ class ItemListRevealOptionsItemNode: ListViewItemNode, UIGestureRecognizerDelega
|
|||
}
|
||||
}
|
||||
|
||||
func revealOptionSelected(_ option: ItemListRevealOption, animated: Bool) {
|
||||
open func revealOptionSelected(_ option: ItemListRevealOption, animated: Bool) {
|
||||
}
|
||||
|
||||
override var preventsTouchesToOtherItems: Bool {
|
||||
override open var preventsTouchesToOtherItems: Bool {
|
||||
return self.isDisplayingRevealedOptions
|
||||
}
|
||||
|
||||
override func touchesToOtherItemsPrevented() {
|
||||
override open func touchesToOtherItemsPrevented() {
|
||||
if self.isDisplayingRevealedOptions {
|
||||
self.setRevealOptionsOpened(false, animated: true)
|
||||
}
|
||||
|
|
@ -5,23 +5,28 @@ import AsyncDisplayKit
|
|||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
||||
struct ItemListMultilineInputItemTextLimit {
|
||||
let value: Int
|
||||
let display: Bool
|
||||
public struct ItemListMultilineInputItemTextLimit {
|
||||
public let value: Int
|
||||
public let display: Bool
|
||||
|
||||
public init(value: Int, display: Bool) {
|
||||
self.value = value
|
||||
self.display = display
|
||||
}
|
||||
}
|
||||
|
||||
class ItemListMultilineInputItem: ListViewItem, ItemListItem {
|
||||
public class ItemListMultilineInputItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let text: String
|
||||
let placeholder: String
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let style: ItemListStyle
|
||||
let action: () -> Void
|
||||
let textUpdated: (String) -> Void
|
||||
let tag: ItemListItemTag?
|
||||
public let tag: ItemListItemTag?
|
||||
let maxLength: ItemListMultilineInputItemTextLimit?
|
||||
|
||||
init(theme: PresentationTheme, text: String, placeholder: String, maxLength: ItemListMultilineInputItemTextLimit?, sectionId: ItemListSectionId, style: ItemListStyle, textUpdated: @escaping (String) -> Void, tag: ItemListItemTag? = nil, action: @escaping () -> Void) {
|
||||
public init(theme: PresentationTheme, text: String, placeholder: String, maxLength: ItemListMultilineInputItemTextLimit?, sectionId: ItemListSectionId, style: ItemListStyle, textUpdated: @escaping (String) -> Void, tag: ItemListItemTag? = nil, action: @escaping () -> Void) {
|
||||
self.theme = theme
|
||||
self.text = text
|
||||
self.placeholder = placeholder
|
||||
|
|
@ -33,7 +38,7 @@ class ItemListMultilineInputItem: ListViewItem, ItemListItem {
|
|||
self.action = action
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListMultilineInputItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -49,7 +54,7 @@ class ItemListMultilineInputItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListMultilineInputItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -69,7 +74,7 @@ class ItemListMultilineInputItem: ListViewItem, ItemListItem {
|
|||
|
||||
private let titleFont = Font.regular(17.0)
|
||||
|
||||
class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelegate, ItemListItemNode, ItemListItemFocusableNode {
|
||||
public class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelegate, ItemListItemNode, ItemListItemFocusableNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -83,11 +88,11 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
private var item: ItemListMultilineInputItem?
|
||||
private var layoutParams: ListViewItemLayoutParams?
|
||||
|
||||
var tag: ItemListItemTag? {
|
||||
public var tag: ItemListItemTag? {
|
||||
return self.item?.tag
|
||||
}
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
|
||||
|
|
@ -112,20 +117,20 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
var textColor: UIColor = .black
|
||||
if let item = self.item {
|
||||
textColor = item.theme.list.itemPrimaryTextColor
|
||||
}
|
||||
self.textNode.typingAttributes = [NSAttributedStringKey.font.rawValue: Font.regular(17.0), NSAttributedStringKey.foregroundColor.rawValue: textColor]
|
||||
self.textNode.typingAttributes = [NSAttributedString.Key.font.rawValue: Font.regular(17.0), NSAttributedString.Key.foregroundColor.rawValue: textColor]
|
||||
self.textNode.clipsToBounds = true
|
||||
self.textNode.delegate = self
|
||||
self.textNode.hitTestSlop = UIEdgeInsets(top: -5.0, left: -5.0, bottom: -5.0, right: -5.0)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListMultilineInputItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListMultilineInputItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTextLayout = TextNode.asyncLayout(self.measureTextNode)
|
||||
let makeLimitTextLayout = TextNode.asyncLayout(self.limitTextNode)
|
||||
|
||||
|
|
@ -202,7 +207,7 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
strongSelf.backgroundNode.backgroundColor = itemBackgroundColor
|
||||
|
||||
if strongSelf.isNodeLoaded {
|
||||
strongSelf.textNode.typingAttributes = [NSAttributedStringKey.font.rawValue: Font.regular(17.0), NSAttributedStringKey.foregroundColor.rawValue: item.theme.list.itemPrimaryTextColor]
|
||||
strongSelf.textNode.typingAttributes = [NSAttributedString.Key.font.rawValue: Font.regular(17.0), NSAttributedString.Key.foregroundColor.rawValue: item.theme.list.itemPrimaryTextColor]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -264,15 +269,15 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
override func animateFrameTransition(_ progress: CGFloat, _ currentValue: CGFloat) {
|
||||
override public func animateFrameTransition(_ progress: CGFloat, _ currentValue: CGFloat) {
|
||||
super.animateFrameTransition(progress, currentValue)
|
||||
|
||||
guard let params = self.layoutParams else {
|
||||
|
|
@ -293,7 +298,7 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
self.textClippingNode.frame = CGRect(origin: CGPoint(x: leftInset, y: textTopInset), size: CGSize(width: max(0.0, params.width - leftInset - params.rightInset), height: max(0.0, contentSize.height - textTopInset - textBottomInset)))
|
||||
}
|
||||
|
||||
func editableTextNodeDidUpdateText(_ editableTextNode: ASEditableTextNode) {
|
||||
public func editableTextNodeDidUpdateText(_ editableTextNode: ASEditableTextNode) {
|
||||
if let item = self.item {
|
||||
if let text = self.textNode.attributedText {
|
||||
let updatedText = text.string
|
||||
|
|
@ -308,7 +313,7 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
}
|
||||
}
|
||||
|
||||
func editableTextNodeShouldPaste(_ editableTextNode: ASEditableTextNode) -> Bool {
|
||||
public func editableTextNodeShouldPaste(_ editableTextNode: ASEditableTextNode) -> Bool {
|
||||
if let _ = self.item {
|
||||
let text: String? = UIPasteboard.general.string
|
||||
if let _ = text {
|
||||
|
|
@ -318,13 +323,13 @@ class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNodeDelega
|
|||
return false
|
||||
}
|
||||
|
||||
func focus() {
|
||||
public func focus() {
|
||||
if !self.textNode.textView.isFirstResponder {
|
||||
self.textNode.textView.becomeFirstResponder()
|
||||
}
|
||||
}
|
||||
|
||||
func animateError() {
|
||||
public func animateError() {
|
||||
self.textNode.layer.addShakeAnimation()
|
||||
}
|
||||
}
|
||||
|
|
@ -4,23 +4,14 @@ import Display
|
|||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import TextFormat
|
||||
import AccountContext
|
||||
|
||||
enum TextLinkItemActionType {
|
||||
case tap
|
||||
case longTap
|
||||
}
|
||||
|
||||
enum TextLinkItem {
|
||||
case url(String)
|
||||
case mention(String)
|
||||
case hashtag(String?, String)
|
||||
}
|
||||
|
||||
class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
||||
public class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let text: String
|
||||
let enabledEntityTypes: EnabledEntityTypes
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let style: ItemListStyle
|
||||
let action: (() -> Void)?
|
||||
let longTapAction: (() -> Void)?
|
||||
|
|
@ -28,9 +19,9 @@ class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
|||
|
||||
let tag: Any?
|
||||
|
||||
let selectable: Bool
|
||||
public let selectable: Bool
|
||||
|
||||
init(theme: PresentationTheme, text: String, enabledEntityTypes: EnabledEntityTypes, sectionId: ItemListSectionId, style: ItemListStyle, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
|
||||
public init(theme: PresentationTheme, text: String, enabledEntityTypes: EnabledEntityTypes, sectionId: ItemListSectionId, style: ItemListStyle, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
|
||||
self.theme = theme
|
||||
self.text = text
|
||||
self.enabledEntityTypes = enabledEntityTypes
|
||||
|
|
@ -44,7 +35,7 @@ class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
|||
self.selectable = action != nil
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListMultilineTextItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -60,7 +51,7 @@ class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListMultilineTextItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -77,7 +68,7 @@ class ItemListMultilineTextItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func selected(listView: ListView){
|
||||
public func selected(listView: ListView){
|
||||
listView.clearHighlightAnimated(true)
|
||||
self.action?()
|
||||
}
|
||||
|
|
@ -89,7 +80,7 @@ private let titleItalicFont = Font.italic(17.0)
|
|||
private let titleBoldItalicFont = Font.semiboldItalic(17.0)
|
||||
private let titleFixedFont = Font.regular(17.0)
|
||||
|
||||
class ItemListMultilineTextItemNode: ListViewItemNode {
|
||||
public class ItemListMultilineTextItemNode: ListViewItemNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -102,15 +93,15 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
|
||||
private var item: ItemListMultilineTextItem?
|
||||
|
||||
var tag: Any? {
|
||||
public var tag: Any? {
|
||||
return self.item?.tag
|
||||
}
|
||||
|
||||
override var canBeLongTapped: Bool {
|
||||
override public var canBeLongTapped: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
self.backgroundNode.backgroundColor = .white
|
||||
|
|
@ -137,7 +128,7 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
self.addSubnode(self.activateArea)
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let recognizer = TapLongTapOrDoubleTapGestureRecognizer(target: self, action: #selector(self.tapLongTapOrDoubleTapGesture(_:)))
|
||||
|
|
@ -155,7 +146,7 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
self.view.addGestureRecognizer(recognizer)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListMultilineTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListMultilineTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTextLayout = TextNode.asyncLayout(self.textNode)
|
||||
|
||||
let currentItem = self.item
|
||||
|
|
@ -273,7 +264,7 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted && self.linkItemAtPoint(point) == nil {
|
||||
|
|
@ -311,15 +302,15 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
@objc func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
@objc private func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
switch recognizer.state {
|
||||
case .ended:
|
||||
if let (gesture, location) = recognizer.lastRecognizedGestureAndLocation {
|
||||
|
|
@ -340,11 +331,11 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
private func linkItemAtPoint(_ point: CGPoint) -> TextLinkItem? {
|
||||
let textNodeFrame = self.textNode.frame
|
||||
if let (_, attributes) = self.textNode.attributesAtPoint(CGPoint(x: point.x - textNodeFrame.minX, y: point.y - textNodeFrame.minY)) {
|
||||
if let url = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
if let url = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
return .url(url)
|
||||
} else if let peerName = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.PeerTextMention)] as? String {
|
||||
} else if let peerName = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.PeerTextMention)] as? String {
|
||||
return .mention(peerName)
|
||||
} else if let hashtag = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
return .hashtag(hashtag.peerName, hashtag.hashtag)
|
||||
} else {
|
||||
return nil
|
||||
|
|
@ -353,7 +344,7 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
return nil
|
||||
}
|
||||
|
||||
override func longTapped() {
|
||||
override public func longTapped() {
|
||||
self.item?.longTapAction?()
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +362,7 @@ class ItemListMultilineTextItemNode: ListViewItemNode {
|
|||
TelegramTextAttributes.Hashtag
|
||||
]
|
||||
for name in possibleNames {
|
||||
if let _ = attributes[NSAttributedStringKey(rawValue: name)] {
|
||||
if let _ = attributes[NSAttributedString.Key(rawValue: name)] {
|
||||
rects = self.textNode.attributeRects(name: name, at: index)
|
||||
break
|
||||
}
|
||||
|
|
@ -4,13 +4,14 @@ import Display
|
|||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import SwitchNode
|
||||
|
||||
enum ItemListSwitchItemNodeType {
|
||||
public enum ItemListSwitchItemNodeType {
|
||||
case regular
|
||||
case icon
|
||||
}
|
||||
|
||||
class ItemListSwitchItem: ListViewItem, ItemListItem {
|
||||
public class ItemListSwitchItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let title: String
|
||||
let value: Bool
|
||||
|
|
@ -18,12 +19,12 @@ class ItemListSwitchItem: ListViewItem, ItemListItem {
|
|||
let enableInteractiveChanges: Bool
|
||||
let enabled: Bool
|
||||
let maximumNumberOfLines: Int
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let style: ItemListStyle
|
||||
let updated: (Bool) -> Void
|
||||
let tag: ItemListItemTag?
|
||||
public let tag: ItemListItemTag?
|
||||
|
||||
init(theme: PresentationTheme, title: String, value: Bool, type: ItemListSwitchItemNodeType = .regular, enableInteractiveChanges: Bool = true, enabled: Bool = true, maximumNumberOfLines: Int = 1, sectionId: ItemListSectionId, style: ItemListStyle, updated: @escaping (Bool) -> Void, tag: ItemListItemTag? = nil) {
|
||||
public init(theme: PresentationTheme, title: String, value: Bool, type: ItemListSwitchItemNodeType = .regular, enableInteractiveChanges: Bool = true, enabled: Bool = true, maximumNumberOfLines: Int = 1, sectionId: ItemListSectionId, style: ItemListStyle, updated: @escaping (Bool) -> Void, tag: ItemListItemTag? = nil) {
|
||||
self.theme = theme
|
||||
self.title = title
|
||||
self.value = value
|
||||
|
|
@ -37,7 +38,7 @@ class ItemListSwitchItem: ListViewItem, ItemListItem {
|
|||
self.tag = tag
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListSwitchItemNode(type: self.type)
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -53,7 +54,7 @@ class ItemListSwitchItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListSwitchItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -108,7 +109,7 @@ extension SwitchNode: ItemListSwitchNodeImpl {
|
|||
extension IconSwitchNode: ItemListSwitchNodeImpl {
|
||||
}
|
||||
|
||||
class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
||||
public class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
||||
private let backgroundNode: ASDisplayNode
|
||||
private let topStripeNode: ASDisplayNode
|
||||
private let bottomStripeNode: ASDisplayNode
|
||||
|
|
@ -123,7 +124,7 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
|
||||
private var item: ItemListSwitchItem?
|
||||
|
||||
var tag: ItemListItemTag? {
|
||||
public var tag: ItemListItemTag? {
|
||||
return self.item?.tag
|
||||
}
|
||||
|
||||
|
|
@ -174,7 +175,7 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
(self.switchNode.view as? UISwitch)?.addTarget(self, action: #selector(self.switchValueChanged(_:)), for: .valueChanged)
|
||||
|
|
@ -241,7 +242,7 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
var accessibilityTraits = UIAccessibilityTraits()
|
||||
if item.enabled {
|
||||
} else {
|
||||
accessibilityTraits |= UIAccessibilityTraitNotEnabled
|
||||
accessibilityTraits.insert(.notEnabled)
|
||||
}
|
||||
strongSelf.activateArea.accessibilityTraits = accessibilityTraits
|
||||
|
||||
|
|
@ -351,7 +352,7 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func accessibilityActivate() -> Bool {
|
||||
override public func accessibilityActivate() -> Bool {
|
||||
guard let item = self.item else {
|
||||
return false
|
||||
}
|
||||
|
|
@ -368,7 +369,7 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
return true
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted {
|
||||
|
|
@ -406,22 +407,22 @@ class ItemListSwitchItemNode: ListViewItemNode, ItemListItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
@objc func switchValueChanged(_ switchView: UISwitch) {
|
||||
@objc private func switchValueChanged(_ switchView: UISwitch) {
|
||||
if let item = self.item {
|
||||
let value = switchView.isOn
|
||||
item.updated(value)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func tapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
@objc private func tapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||
if let item = self.item, let switchView = self.switchNode.view as? UISwitch, case .ended = recognizer.state {
|
||||
let value = switchView.isOn
|
||||
item.updated(!value)
|
||||
|
|
@ -4,25 +4,26 @@ import Display
|
|||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import TextFormat
|
||||
|
||||
enum ItemListTextItemText {
|
||||
public enum ItemListTextItemText {
|
||||
case plain(String)
|
||||
case markdown(String)
|
||||
}
|
||||
|
||||
enum ItemListTextItemLinkAction {
|
||||
public enum ItemListTextItemLinkAction {
|
||||
case tap(String)
|
||||
}
|
||||
|
||||
class ItemListTextItem: ListViewItem, ItemListItem {
|
||||
public class ItemListTextItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let text: ItemListTextItemText
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let linkAction: ((ItemListTextItemLinkAction) -> Void)?
|
||||
let style: ItemListStyle
|
||||
let isAlwaysPlain: Bool = true
|
||||
public let isAlwaysPlain: Bool = true
|
||||
|
||||
init(theme: PresentationTheme, text: ItemListTextItemText, sectionId: ItemListSectionId, linkAction: ((ItemListTextItemLinkAction) -> Void)? = nil, style: ItemListStyle = .blocks) {
|
||||
public init(theme: PresentationTheme, text: ItemListTextItemText, sectionId: ItemListSectionId, linkAction: ((ItemListTextItemLinkAction) -> Void)? = nil, style: ItemListStyle = .blocks) {
|
||||
self.theme = theme
|
||||
self.text = text
|
||||
self.sectionId = sectionId
|
||||
|
|
@ -30,7 +31,7 @@ class ItemListTextItem: ListViewItem, ItemListItem {
|
|||
self.style = style
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListTextItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -46,7 +47,7 @@ class ItemListTextItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
guard let nodeValue = node() as? ItemListTextItemNode else {
|
||||
assertionFailure()
|
||||
|
|
@ -70,20 +71,20 @@ class ItemListTextItem: ListViewItem, ItemListItem {
|
|||
private let titleFont = Font.regular(14.0)
|
||||
private let titleBoldFont = Font.semibold(14.0)
|
||||
|
||||
class ItemListTextItemNode: ListViewItemNode {
|
||||
public class ItemListTextItemNode: ListViewItemNode {
|
||||
private let titleNode: TextNode
|
||||
private let activateArea: AccessibilityAreaNode
|
||||
|
||||
private var item: ItemListTextItem?
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.titleNode = TextNode()
|
||||
self.titleNode.isUserInteractionEnabled = false
|
||||
self.titleNode.contentMode = .left
|
||||
self.titleNode.contentsScale = UIScreen.main.scale
|
||||
|
||||
self.activateArea = AccessibilityAreaNode()
|
||||
self.activateArea.accessibilityTraits = UIAccessibilityTraitStaticText
|
||||
self.activateArea.accessibilityTraits = .staticText
|
||||
|
||||
super.init(layerBacked: false, dynamicBounce: false)
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ class ItemListTextItemNode: ListViewItemNode {
|
|||
self.addSubnode(self.activateArea)
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let recognizer = TapLongTapOrDoubleTapGestureRecognizer(target: self, action: #selector(self.tapLongTapOrDoubleTapGesture(_:)))
|
||||
|
|
@ -101,7 +102,7 @@ class ItemListTextItemNode: ListViewItemNode {
|
|||
self.view.addGestureRecognizer(recognizer)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListTextItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
|
||||
let makeTitleLayout = TextNode.asyncLayout(self.titleNode)
|
||||
|
||||
return { item, params, neighbors in
|
||||
|
|
@ -143,15 +144,15 @@ class ItemListTextItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
@objc func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
@objc private func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
switch recognizer.state {
|
||||
case .ended:
|
||||
if let (gesture, location) = recognizer.lastRecognizedGestureAndLocation {
|
||||
|
|
@ -160,7 +161,7 @@ class ItemListTextItemNode: ListViewItemNode {
|
|||
let titleFrame = self.titleNode.frame
|
||||
if let item = self.item, titleFrame.contains(location) {
|
||||
if let (_, attributes) = self.titleNode.attributesAtPoint(CGPoint(x: location.x - titleFrame.minX, y: location.y - titleFrame.minY)) {
|
||||
if let url = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
if let url = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
item.linkAction?(.tap(url))
|
||||
}
|
||||
}
|
||||
|
|
@ -4,31 +4,33 @@ import Display
|
|||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import TextFormat
|
||||
import AccountContext
|
||||
|
||||
enum ItemListTextWithLabelItemTextColor {
|
||||
public enum ItemListTextWithLabelItemTextColor {
|
||||
case primary
|
||||
case accent
|
||||
case highlighted
|
||||
}
|
||||
|
||||
final class ItemListTextWithLabelItem: ListViewItem, ItemListItem {
|
||||
public final class ItemListTextWithLabelItem: ListViewItem, ItemListItem {
|
||||
let theme: PresentationTheme
|
||||
let label: String
|
||||
let text: String
|
||||
public let label: String
|
||||
public let text: String
|
||||
let style: ItemListStyle
|
||||
let labelColor: ItemListTextWithLabelItemTextColor
|
||||
let textColor: ItemListTextWithLabelItemTextColor
|
||||
let enabledEntityTypes: EnabledEntityTypes
|
||||
let multiline: Bool
|
||||
let selected: Bool?
|
||||
let sectionId: ItemListSectionId
|
||||
public let sectionId: ItemListSectionId
|
||||
let action: (() -> Void)?
|
||||
let longTapAction: (() -> Void)?
|
||||
let linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)?
|
||||
|
||||
let tag: Any?
|
||||
public let tag: Any?
|
||||
|
||||
init(theme: PresentationTheme, label: String, text: String, style: ItemListStyle = .plain, labelColor: ItemListTextWithLabelItemTextColor = .primary, textColor: ItemListTextWithLabelItemTextColor = .primary, enabledEntityTypes: EnabledEntityTypes, multiline: Bool, selected: Bool? = nil, sectionId: ItemListSectionId, action: (() -> Void)?, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
|
||||
public init(theme: PresentationTheme, label: String, text: String, style: ItemListStyle = .plain, labelColor: ItemListTextWithLabelItemTextColor = .primary, textColor: ItemListTextWithLabelItemTextColor = .primary, enabledEntityTypes: EnabledEntityTypes, multiline: Bool, selected: Bool? = nil, sectionId: ItemListSectionId, action: (() -> Void)?, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
|
||||
self.theme = theme
|
||||
self.label = label
|
||||
self.text = text
|
||||
|
|
@ -45,7 +47,7 @@ final class ItemListTextWithLabelItem: ListViewItem, ItemListItem {
|
|||
self.tag = tag
|
||||
}
|
||||
|
||||
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
|
||||
async {
|
||||
let node = ItemListTextWithLabelItemNode()
|
||||
let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
|
||||
|
|
@ -61,7 +63,7 @@ final class ItemListTextWithLabelItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
|
||||
Queue.mainQueue().async {
|
||||
if let nodeValue = node() as? ItemListTextWithLabelItemNode {
|
||||
let makeLayout = nodeValue.asyncLayout()
|
||||
|
|
@ -78,11 +80,11 @@ final class ItemListTextWithLabelItem: ListViewItem, ItemListItem {
|
|||
}
|
||||
}
|
||||
|
||||
var selectable: Bool {
|
||||
public var selectable: Bool {
|
||||
return self.action != nil
|
||||
}
|
||||
|
||||
func selected(listView: ListView) {
|
||||
public func selected(listView: ListView) {
|
||||
listView.clearHighlightAnimated(true)
|
||||
self.action?()
|
||||
}
|
||||
|
|
@ -95,7 +97,7 @@ private let textItalicFont = Font.italic(17.0)
|
|||
private let textBoldItalicFont = Font.semiboldItalic(17.0)
|
||||
private let textFixedFont = Font.regular(17.0)
|
||||
|
||||
class ItemListTextWithLabelItemNode: ListViewItemNode {
|
||||
public class ItemListTextWithLabelItemNode: ListViewItemNode {
|
||||
let labelNode: TextNode
|
||||
let textNode: TextNode
|
||||
|
||||
|
|
@ -106,13 +108,13 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
private var linkHighlightingNode: LinkHighlightingNode?
|
||||
private var selectionNode: ItemListSelectableControlNode?
|
||||
|
||||
var item: ItemListTextWithLabelItem?
|
||||
public var item: ItemListTextWithLabelItem?
|
||||
|
||||
override var canBeLongTapped: Bool {
|
||||
override public var canBeLongTapped: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
init() {
|
||||
public init() {
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.isLayerBacked = true
|
||||
|
||||
|
|
@ -143,7 +145,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
self.addSubnode(self.textNode)
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
override public func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
let recognizer = TapLongTapOrDoubleTapGestureRecognizer(target: self, action: #selector(self.tapLongTapOrDoubleTapGesture(_:)))
|
||||
|
|
@ -161,7 +163,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
self.view.addGestureRecognizer(recognizer)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListTextWithLabelItem, _ params: ListViewItemLayoutParams, _ insets: ItemListNeighbors) -> (ListViewItemNodeLayout, (ListViewItemUpdateAnimation) -> Void) {
|
||||
public func asyncLayout() -> (_ item: ItemListTextWithLabelItem, _ params: ListViewItemLayoutParams, _ insets: ItemListNeighbors) -> (ListViewItemNodeLayout, (ListViewItemUpdateAnimation) -> Void) {
|
||||
let makeLabelLayout = TextNode.asyncLayout(self.labelNode)
|
||||
let makeTextLayout = TextNode.asyncLayout(self.textNode)
|
||||
|
||||
|
|
@ -323,7 +325,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
|
||||
super.setHighlighted(highlighted, at: point, animated: animated)
|
||||
|
||||
if highlighted && self.linkItemAtPoint(point) == nil && self.selectionNode == nil {
|
||||
|
|
@ -361,7 +363,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
@objc private func tapLongTapOrDoubleTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
switch recognizer.state {
|
||||
case .ended:
|
||||
if let (gesture, location) = recognizer.lastRecognizedGestureAndLocation {
|
||||
|
|
@ -382,11 +384,11 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
private func linkItemAtPoint(_ point: CGPoint) -> TextLinkItem? {
|
||||
let textNodeFrame = self.textNode.frame
|
||||
if let (_, attributes) = self.textNode.attributesAtPoint(CGPoint(x: point.x - textNodeFrame.minX, y: point.y - textNodeFrame.minY)) {
|
||||
if let url = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
if let url = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
return .url(url)
|
||||
} else if let peerName = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.PeerTextMention)] as? String {
|
||||
} else if let peerName = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.PeerTextMention)] as? String {
|
||||
return .mention(peerName)
|
||||
} else if let hashtag = attributes[NSAttributedStringKey(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
return .hashtag(hashtag.peerName, hashtag.hashtag)
|
||||
} else {
|
||||
return nil
|
||||
|
|
@ -395,15 +397,15 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
return nil
|
||||
}
|
||||
|
||||
override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
|
||||
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
|
||||
}
|
||||
|
||||
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
override public func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||
}
|
||||
|
||||
override func longTapped() {
|
||||
override public func longTapped() {
|
||||
self.item?.longTapAction?()
|
||||
}
|
||||
|
||||
|
|
@ -421,7 +423,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
TelegramTextAttributes.Hashtag
|
||||
]
|
||||
for name in possibleNames {
|
||||
if let _ = attributes[NSAttributedStringKey(rawValue: name)] {
|
||||
if let _ = attributes[NSAttributedString.Key(rawValue: name)] {
|
||||
rects = self.textNode.attributeRects(name: name, at: index)
|
||||
break
|
||||
}
|
||||
|
|
@ -449,7 +451,7 @@ class ItemListTextWithLabelItemNode: ListViewItemNode {
|
|||
}
|
||||
}
|
||||
|
||||
var tag: Any? {
|
||||
public var tag: Any? {
|
||||
return self.item?.tag
|
||||
}
|
||||
}
|
||||
22
submodules/MediaResources/Info.plist
Normal file
22
submodules/MediaResources/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,555 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D084FA0222F435FD004874CE /* MediaResources.h in Headers */ = {isa = PBXBuildFile; fileRef = D084FA0022F435FD004874CE /* MediaResources.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D084FA0D22F436C9004874CE /* CachedResourceRepresentations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D084FA0C22F436C9004874CE /* CachedResourceRepresentations.swift */; };
|
||||
D084FA1022F436D3004874CE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA0F22F436D3004874CE /* UIKit.framework */; };
|
||||
D084FA1222F436D6004874CE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1122F436D6004874CE /* Foundation.framework */; };
|
||||
D084FA1422F436DA004874CE /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1322F436DA004874CE /* Postbox.framework */; };
|
||||
D084FA1622F436DE004874CE /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1522F436DE004874CE /* SwiftSignalKit.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D084F9FD22F435FD004874CE /* MediaResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MediaResources.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D084FA0022F435FD004874CE /* MediaResources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaResources.h; sourceTree = "<group>"; };
|
||||
D084FA0122F435FD004874CE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D084FA0C22F436C9004874CE /* CachedResourceRepresentations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CachedResourceRepresentations.swift; sourceTree = "<group>"; };
|
||||
D084FA0F22F436D3004874CE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D084FA1122F436D6004874CE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D084FA1322F436DA004874CE /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D084FA1522F436DE004874CE /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D084F9FA22F435FD004874CE /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D084FA1622F436DE004874CE /* SwiftSignalKit.framework in Frameworks */,
|
||||
D084FA1422F436DA004874CE /* Postbox.framework in Frameworks */,
|
||||
D084FA1222F436D6004874CE /* Foundation.framework in Frameworks */,
|
||||
D084FA1022F436D3004874CE /* UIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D084F9F322F435FD004874CE = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D084FA0122F435FD004874CE /* Info.plist */,
|
||||
D084F9FF22F435FD004874CE /* Sources */,
|
||||
D084F9FE22F435FD004874CE /* Products */,
|
||||
D084FA0E22F436D2004874CE /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D084F9FE22F435FD004874CE /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D084F9FD22F435FD004874CE /* MediaResources.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D084F9FF22F435FD004874CE /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D084FA0C22F436C9004874CE /* CachedResourceRepresentations.swift */,
|
||||
D084FA0022F435FD004874CE /* MediaResources.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D084FA0E22F436D2004874CE /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D084FA1522F436DE004874CE /* SwiftSignalKit.framework */,
|
||||
D084FA1322F436DA004874CE /* Postbox.framework */,
|
||||
D084FA1122F436D6004874CE /* Foundation.framework */,
|
||||
D084FA0F22F436D3004874CE /* UIKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D084F9F822F435FD004874CE /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D084FA0222F435FD004874CE /* MediaResources.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D084F9FC22F435FD004874CE /* MediaResources */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D084FA0522F435FD004874CE /* Build configuration list for PBXNativeTarget "MediaResources" */;
|
||||
buildPhases = (
|
||||
D084F9F822F435FD004874CE /* Headers */,
|
||||
D084F9F922F435FD004874CE /* Sources */,
|
||||
D084F9FA22F435FD004874CE /* Frameworks */,
|
||||
D084F9FB22F435FD004874CE /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = MediaResources;
|
||||
productName = MediaResources;
|
||||
productReference = D084F9FD22F435FD004874CE /* MediaResources.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D084F9F422F435FD004874CE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1030;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D084F9FC22F435FD004874CE = {
|
||||
CreatedOnToolsVersion = 10.3;
|
||||
LastSwiftMigration = 1030;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D084F9F722F435FD004874CE /* Build configuration list for PBXProject "MediaResources_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D084F9F322F435FD004874CE;
|
||||
productRefGroup = D084F9FE22F435FD004874CE /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D084F9FC22F435FD004874CE /* MediaResources */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D084F9FB22F435FD004874CE /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D084F9F922F435FD004874CE /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D084FA0D22F436C9004874CE /* CachedResourceRepresentations.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D084FA0322F435FD004874CE /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D084FA0422F435FD004874CE /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D084FA0622F435FD004874CE /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MediaResources;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D084FA0722F435FD004874CE /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MediaResources;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D084FA0822F4361A004874CE /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D084FA0922F4361A004874CE /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MediaResources;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D084FA0A22F43625004874CE /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D084FA0B22F43625004874CE /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MediaResources;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D084F9F722F435FD004874CE /* Build configuration list for PBXProject "MediaResources_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D084FA0322F435FD004874CE /* DebugAppStoreLLC */,
|
||||
D084FA0822F4361A004874CE /* DebugHockeyapp */,
|
||||
D084FA0422F435FD004874CE /* ReleaseAppStoreLLC */,
|
||||
D084FA0A22F43625004874CE /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D084FA0522F435FD004874CE /* Build configuration list for PBXNativeTarget "MediaResources" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D084FA0622F435FD004874CE /* DebugAppStoreLLC */,
|
||||
D084FA0922F4361A004874CE /* DebugHockeyapp */,
|
||||
D084FA0722F435FD004874CE /* ReleaseAppStoreLLC */,
|
||||
D084FA0B22F43625004874CE /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D084F9F422F435FD004874CE /* Project object */;
|
||||
}
|
||||
|
|
@ -271,7 +271,7 @@ final class CachedAnimatedStickerRepresentation: CachedMediaResourceRepresentati
|
|||
let height: Int32
|
||||
|
||||
var uniqueId: String {
|
||||
return "animated-sticker-\(self.width)x\(self.height)-v6"
|
||||
return "animated-sticker-\(self.width)x\(self.height)-v7"
|
||||
}
|
||||
|
||||
init(width: Int32, height: Int32) {
|
||||
19
submodules/MediaResources/Sources/MediaResources.h
Normal file
19
submodules/MediaResources/Sources/MediaResources.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// MediaResources.h
|
||||
// MediaResources
|
||||
//
|
||||
// Created by Peter on 8/2/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for MediaResources.
|
||||
FOUNDATION_EXPORT double MediaResourcesVersionNumber;
|
||||
|
||||
//! Project version string for MediaResources.
|
||||
FOUNDATION_EXPORT const unsigned char MediaResourcesVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <MediaResources/PublicHeader.h>
|
||||
|
||||
|
||||
22
submodules/MergeLists/Info.plist
Normal file
22
submodules/MergeLists/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
547
submodules/MergeLists/MergeLists_Xcode.xcodeproj/project.pbxproj
Normal file
547
submodules/MergeLists/MergeLists_Xcode.xcodeproj/project.pbxproj
Normal file
|
|
@ -0,0 +1,547 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D0D3288622F338CB00D07EE2 /* MergeLists.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3288422F338CB00D07EE2 /* MergeLists.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0D3289122F3443C00D07EE2 /* MergeLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3289022F3443C00D07EE2 /* MergeLists.swift */; };
|
||||
D0D3289322F3444800D07EE2 /* Identifiable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3289222F3444800D07EE2 /* Identifiable.swift */; };
|
||||
D0D3289622F3445700D07EE2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3289522F3445700D07EE2 /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D0D3288122F338CB00D07EE2 /* MergeLists.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MergeLists.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0D3288422F338CB00D07EE2 /* MergeLists.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MergeLists.h; sourceTree = "<group>"; };
|
||||
D0D3288522F338CB00D07EE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D0D3289022F3443C00D07EE2 /* MergeLists.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MergeLists.swift; sourceTree = "<group>"; };
|
||||
D0D3289222F3444800D07EE2 /* Identifiable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Identifiable.swift; sourceTree = "<group>"; };
|
||||
D0D3289522F3445700D07EE2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D0D3287E22F338CB00D07EE2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3289622F3445700D07EE2 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D0D3287722F338CB00D07EE2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3288522F338CB00D07EE2 /* Info.plist */,
|
||||
D0D3288322F338CB00D07EE2 /* Sources */,
|
||||
D0D3288222F338CB00D07EE2 /* Products */,
|
||||
D0D3289422F3445700D07EE2 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3288222F338CB00D07EE2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3288122F338CB00D07EE2 /* MergeLists.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3288322F338CB00D07EE2 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3289022F3443C00D07EE2 /* MergeLists.swift */,
|
||||
D0D3289222F3444800D07EE2 /* Identifiable.swift */,
|
||||
D0D3288422F338CB00D07EE2 /* MergeLists.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D3289422F3445700D07EE2 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D3289522F3445700D07EE2 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D0D3287C22F338CB00D07EE2 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3288622F338CB00D07EE2 /* MergeLists.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D0D3288022F338CB00D07EE2 /* MergeLists */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D0D3288922F338CB00D07EE2 /* Build configuration list for PBXNativeTarget "MergeLists" */;
|
||||
buildPhases = (
|
||||
D0D3287C22F338CB00D07EE2 /* Headers */,
|
||||
D0D3287D22F338CB00D07EE2 /* Sources */,
|
||||
D0D3287E22F338CB00D07EE2 /* Frameworks */,
|
||||
D0D3287F22F338CB00D07EE2 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = MergeLists;
|
||||
productName = MergeLists;
|
||||
productReference = D0D3288122F338CB00D07EE2 /* MergeLists.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D0D3287822F338CB00D07EE2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D0D3288022F338CB00D07EE2 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D0D3287B22F338CB00D07EE2 /* Build configuration list for PBXProject "MergeLists_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D0D3287722F338CB00D07EE2;
|
||||
productRefGroup = D0D3288222F338CB00D07EE2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D0D3288022F338CB00D07EE2 /* MergeLists */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D0D3287F22F338CB00D07EE2 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D0D3287D22F338CB00D07EE2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D3289122F3443C00D07EE2 /* MergeLists.swift in Sources */,
|
||||
D0D3289322F3444800D07EE2 /* Identifiable.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D0D3288722F338CB00D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3288822F338CB00D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3288A22F338CB00D07EE2 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MergeLists;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D0D3288B22F338CB00D07EE2 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MergeLists;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3288C22F338F300D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3288D22F338F300D07EE2 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MergeLists;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D0D3288E22F3390000D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D0D3288F22F3390000D07EE2 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MergeLists;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D0D3287B22F338CB00D07EE2 /* Build configuration list for PBXProject "MergeLists_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3288722F338CB00D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3288C22F338F300D07EE2 /* DebugHockeyapp */,
|
||||
D0D3288822F338CB00D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3288E22F3390000D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D0D3288922F338CB00D07EE2 /* Build configuration list for PBXNativeTarget "MergeLists" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0D3288A22F338CB00D07EE2 /* DebugAppStoreLLC */,
|
||||
D0D3288D22F338F300D07EE2 /* DebugHockeyapp */,
|
||||
D0D3288B22F338CB00D07EE2 /* ReleaseAppStoreLLC */,
|
||||
D0D3288F22F3390000D07EE2 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D0D3287822F338CB00D07EE2 /* Project object */;
|
||||
}
|
||||
6
submodules/MergeLists/Sources/Identifiable.swift
Normal file
6
submodules/MergeLists/Sources/Identifiable.swift
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import Foundation
|
||||
|
||||
public protocol Identifiable {
|
||||
associatedtype T: Hashable
|
||||
var stableId: T { get }
|
||||
}
|
||||
19
submodules/MergeLists/Sources/MergeLists.h
Normal file
19
submodules/MergeLists/Sources/MergeLists.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// MergeLists.h
|
||||
// MergeLists
|
||||
//
|
||||
// Created by Peter on 8/1/19.
|
||||
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for MergeLists.
|
||||
FOUNDATION_EXPORT double MergeListsVersionNumber;
|
||||
|
||||
//! Project version string for MergeLists.
|
||||
FOUNDATION_EXPORT const unsigned char MergeListsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <MergeLists/PublicHeader.h>
|
||||
|
||||
|
||||
|
|
@ -1,34 +1,29 @@
|
|||
import Foundation
|
||||
|
||||
public protocol Identifiable {
|
||||
associatedtype T: Hashable
|
||||
var stableId: T { get }
|
||||
}
|
||||
|
||||
public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpdated: Bool = false) -> ([Int], [(Int, T, Int?)], [(Int, T, Int)]) where T: Comparable, T: Identifiable {
|
||||
var removeIndices: [Int] = []
|
||||
var insertItems: [(Int, T, Int?)] = []
|
||||
var updatedIndices: [(Int, T, Int)] = []
|
||||
|
||||
if !GlobalExperimentalSettings.isAppStoreBuild {
|
||||
var existingStableIds: [T.T: T] = [:]
|
||||
for item in leftList {
|
||||
if let _ = existingStableIds[item.stableId] {
|
||||
assertionFailure()
|
||||
} else {
|
||||
existingStableIds[item.stableId] = item
|
||||
}
|
||||
}
|
||||
existingStableIds.removeAll()
|
||||
for item in rightList {
|
||||
if let other = existingStableIds[item.stableId] {
|
||||
print("\(other) has the same stableId as \(item): \(item.stableId)")
|
||||
assertionFailure()
|
||||
} else {
|
||||
existingStableIds[item.stableId] = item
|
||||
}
|
||||
#if DEBUG
|
||||
var existingStableIds: [T.T: T] = [:]
|
||||
for item in leftList {
|
||||
if let _ = existingStableIds[item.stableId] {
|
||||
assertionFailure()
|
||||
} else {
|
||||
existingStableIds[item.stableId] = item
|
||||
}
|
||||
}
|
||||
existingStableIds.removeAll()
|
||||
for item in rightList {
|
||||
if let other = existingStableIds[item.stableId] {
|
||||
print("\(other) has the same stableId as \(item): \(item.stableId)")
|
||||
assertionFailure()
|
||||
} else {
|
||||
existingStableIds[item.stableId] = item
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
var currentList = leftList
|
||||
|
||||
|
|
@ -176,11 +171,11 @@ public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpd
|
|||
currentList[index] = item
|
||||
}
|
||||
|
||||
if GlobalExperimentalSettings.isAppStoreBuild {
|
||||
assert(currentList == rightList, "currentList == rightList")
|
||||
} else {
|
||||
precondition(currentList == rightList, "currentList == rightList")
|
||||
}
|
||||
#if DEBUG
|
||||
precondition(currentList == rightList, "currentList == rightList")
|
||||
#else
|
||||
assert(currentList == rightList, "currentList == rightList")
|
||||
#endif
|
||||
|
||||
return (removeIndices, insertItems, updatedIndices)
|
||||
}
|
||||
|
|
@ -1929,6 +1929,7 @@
|
|||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
);
|
||||
mainGroup = D05A830918AFB3F9007F1076;
|
||||
|
|
@ -2492,7 +2493,7 @@
|
|||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -2770,7 +2771,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -3018,7 +3019,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -3266,7 +3267,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -3675,7 +3676,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -3902,7 +3903,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -4122,7 +4123,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -4341,7 +4342,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -4560,7 +4561,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -4801,7 +4802,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -5139,7 +5140,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -5233,7 +5234,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -5285,7 +5286,7 @@
|
|||
"$(PROJECT_DIR)/thirdparty",
|
||||
);
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
@ -5534,7 +5535,7 @@
|
|||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
|
||||
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
|
|
|||
22
submodules/ProgressNavigationButtonNode/Info.plist
Normal file
22
submodules/ProgressNavigationButtonNode/Info.plist
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,563 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D060180922F35B1200796784 /* ProgressNavigationButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D060180722F35B1200796784 /* ProgressNavigationButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D060181422F35BC500796784 /* ProgressNavigationButtonNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D060181322F35BC500796784 /* ProgressNavigationButtonNode.swift */; };
|
||||
D060181722F35C0200796784 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060181622F35C0200796784 /* Foundation.framework */; };
|
||||
D060181922F35C0500796784 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060181822F35C0500796784 /* UIKit.framework */; };
|
||||
D060181B22F35C0800796784 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060181A22F35C0800796784 /* Display.framework */; };
|
||||
D060181D22F35C1400796784 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060181C22F35C1400796784 /* AsyncDisplayKit.framework */; };
|
||||
D060181F22F35C1700796784 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060181E22F35C1700796784 /* TelegramPresentationData.framework */; };
|
||||
D060183E22F35CB300796784 /* ActivityIndicator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D060183D22F35CB300796784 /* ActivityIndicator.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D060180422F35B1200796784 /* ProgressNavigationButtonNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ProgressNavigationButtonNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060180722F35B1200796784 /* ProgressNavigationButtonNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProgressNavigationButtonNode.h; sourceTree = "<group>"; };
|
||||
D060180822F35B1200796784 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D060181322F35BC500796784 /* ProgressNavigationButtonNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProgressNavigationButtonNode.swift; sourceTree = "<group>"; };
|
||||
D060181622F35C0200796784 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D060181822F35C0500796784 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
D060181A22F35C0800796784 /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060181C22F35C1400796784 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060181E22F35C1700796784 /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D060183D22F35CB300796784 /* ActivityIndicator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityIndicator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D060180122F35B1200796784 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060183E22F35CB300796784 /* ActivityIndicator.framework in Frameworks */,
|
||||
D060181F22F35C1700796784 /* TelegramPresentationData.framework in Frameworks */,
|
||||
D060181D22F35C1400796784 /* AsyncDisplayKit.framework in Frameworks */,
|
||||
D060181B22F35C0800796784 /* Display.framework in Frameworks */,
|
||||
D060181922F35C0500796784 /* UIKit.framework in Frameworks */,
|
||||
D060181722F35C0200796784 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D06017FA22F35B1200796784 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060180822F35B1200796784 /* Info.plist */,
|
||||
D060180622F35B1200796784 /* Sources */,
|
||||
D060180522F35B1200796784 /* Products */,
|
||||
D060181522F35C0100796784 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060180522F35B1200796784 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060180422F35B1200796784 /* ProgressNavigationButtonNode.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060180622F35B1200796784 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060181322F35BC500796784 /* ProgressNavigationButtonNode.swift */,
|
||||
D060180722F35B1200796784 /* ProgressNavigationButtonNode.h */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D060181522F35C0100796784 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D060183D22F35CB300796784 /* ActivityIndicator.framework */,
|
||||
D060181E22F35C1700796784 /* TelegramPresentationData.framework */,
|
||||
D060181C22F35C1400796784 /* AsyncDisplayKit.framework */,
|
||||
D060181A22F35C0800796784 /* Display.framework */,
|
||||
D060181822F35C0500796784 /* UIKit.framework */,
|
||||
D060181622F35C0200796784 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D06017FF22F35B1200796784 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060180922F35B1200796784 /* ProgressNavigationButtonNode.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D060180322F35B1200796784 /* ProgressNavigationButtonNode */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D060180C22F35B1200796784 /* Build configuration list for PBXNativeTarget "ProgressNavigationButtonNode" */;
|
||||
buildPhases = (
|
||||
D06017FF22F35B1200796784 /* Headers */,
|
||||
D060180022F35B1200796784 /* Sources */,
|
||||
D060180122F35B1200796784 /* Frameworks */,
|
||||
D060180222F35B1200796784 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ProgressNavigationButtonNode;
|
||||
productName = ProgressNavigationButtonNode;
|
||||
productReference = D060180422F35B1200796784 /* ProgressNavigationButtonNode.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D06017FB22F35B1200796784 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
DefaultBuildSystemTypeForWorkspace = Latest;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Telegram Messenger LLP";
|
||||
TargetAttributes = {
|
||||
D060180322F35B1200796784 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D06017FE22F35B1200796784 /* Build configuration list for PBXProject "ProgressNavigationButtonNode_Xcode" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = D06017FA22F35B1200796784;
|
||||
productRefGroup = D060180522F35B1200796784 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D060180322F35B1200796784 /* ProgressNavigationButtonNode */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D060180222F35B1200796784 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D060180022F35B1200796784 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D060181422F35BC500796784 /* ProgressNavigationButtonNode.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D060180A22F35B1200796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060180B22F35B1200796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060180D22F35B1200796784 /* DebugAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ProgressNavigationButtonNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugAppStoreLLC;
|
||||
};
|
||||
D060180E22F35B1200796784 /* ReleaseAppStoreLLC */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ProgressNavigationButtonNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060180F22F35B3300796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060181022F35B3300796784 /* DebugHockeyapp */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ProgressNavigationButtonNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = DebugHockeyapp;
|
||||
};
|
||||
D060181122F35B4100796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
D060181222F35B4100796784 /* ReleaseHockeyappInternal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ProgressNavigationButtonNode;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = ReleaseHockeyappInternal;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D06017FE22F35B1200796784 /* Build configuration list for PBXProject "ProgressNavigationButtonNode_Xcode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060180A22F35B1200796784 /* DebugAppStoreLLC */,
|
||||
D060180F22F35B3300796784 /* DebugHockeyapp */,
|
||||
D060180B22F35B1200796784 /* ReleaseAppStoreLLC */,
|
||||
D060181122F35B4100796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
D060180C22F35B1200796784 /* Build configuration list for PBXNativeTarget "ProgressNavigationButtonNode" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D060180D22F35B1200796784 /* DebugAppStoreLLC */,
|
||||
D060181022F35B3300796784 /* DebugHockeyapp */,
|
||||
D060180E22F35B1200796784 /* ReleaseAppStoreLLC */,
|
||||
D060181222F35B4100796784 /* ReleaseHockeyappInternal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = ReleaseAppStoreLLC;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D06017FB22F35B1200796784 /* Project object */;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue