diff --git a/Telegram-iOS.xcworkspace/contents.xcworkspacedata b/Telegram-iOS.xcworkspace/contents.xcworkspacedata
index 2670de51a9..8eb96be7d5 100644
--- a/Telegram-iOS.xcworkspace/contents.xcworkspacedata
+++ b/Telegram-iOS.xcworkspace/contents.xcworkspacedata
@@ -382,6 +382,9 @@
+
+
diff --git a/submodules/AccountContext/AccountContext_Xcode.xcodeproj/project.pbxproj b/submodules/AccountContext/AccountContext_Xcode.xcodeproj/project.pbxproj
index 5cbd808a20..e4a5d654e9 100644
--- a/submodules/AccountContext/AccountContext_Xcode.xcodeproj/project.pbxproj
+++ b/submodules/AccountContext/AccountContext_Xcode.xcodeproj/project.pbxproj
@@ -35,6 +35,7 @@
D0C9C12322FE414700FAB518 /* PresentationSurfaceLevels.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */; };
D0C9C3D72300CC2500FAB518 /* FetchMediaUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C3D62300CC2400FAB518 /* FetchMediaUtils.swift */; };
D0C9C3D92300CC6000FAB518 /* IsMediaStreamable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C3D82300CC6000FAB518 /* IsMediaStreamable.swift */; };
+ D0C9CA8A2302314400FAB518 /* ContactSelectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA892302314400FAB518 /* ContactSelectionController.swift */; };
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 */; };
@@ -73,6 +74,7 @@
D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationSurfaceLevels.swift; sourceTree = ""; };
D0C9C3D62300CC2400FAB518 /* FetchMediaUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchMediaUtils.swift; sourceTree = ""; };
D0C9C3D82300CC6000FAB518 /* IsMediaStreamable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IsMediaStreamable.swift; sourceTree = ""; };
+ D0C9CA892302314400FAB518 /* ContactSelectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactSelectionController.swift; sourceTree = ""; };
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 = ""; };
D0D3285322F329A900D07EE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
@@ -149,6 +151,7 @@
D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */,
D0C9C3D62300CC2400FAB518 /* FetchMediaUtils.swift */,
D0C9C3D82300CC6000FAB518 /* IsMediaStreamable.swift */,
+ D0C9CA892302314400FAB518 /* ContactSelectionController.swift */,
);
path = Sources;
sourceTree = "";
@@ -258,6 +261,7 @@
D0879B7122F8425B00C4D6B3 /* WallpaperUploadManager.swift in Sources */,
D0879B6722F7AE6400C4D6B3 /* PresentationCallManager.swift in Sources */,
D0879B2922F77C8300C4D6B3 /* FetchManager.swift in Sources */,
+ D0C9CA8A2302314400FAB518 /* ContactSelectionController.swift in Sources */,
D0C9C12322FE414700FAB518 /* PresentationSurfaceLevels.swift in Sources */,
D0879B6522F7AC8700C4D6B3 /* OverlayMediaManager.swift in Sources */,
D0879B7322F842FF00C4D6B3 /* WatchManager.swift in Sources */,
diff --git a/submodules/AccountContext/Sources/AccountContext.swift b/submodules/AccountContext/Sources/AccountContext.swift
index 6468ed056a..7b8e3df112 100644
--- a/submodules/AccountContext/Sources/AccountContext.swift
+++ b/submodules/AccountContext/Sources/AccountContext.swift
@@ -238,6 +238,135 @@ public enum DeviceContactInfoSubject {
}
}
+public enum PeerInfoControllerMode {
+ case generic
+ case calls(messages: [Message])
+}
+
+public enum ContactListActionItemInlineIconPosition {
+ case left
+ case right
+}
+
+public enum ContactListActionItemIcon : Equatable {
+ case none
+ case generic(UIImage)
+ case inline(UIImage, ContactListActionItemInlineIconPosition)
+
+ public var image: UIImage? {
+ switch self {
+ case .none:
+ return nil
+ case let .generic(image):
+ return image
+ case let .inline(image, _):
+ return image
+ }
+ }
+
+ public static func ==(lhs: ContactListActionItemIcon, rhs: ContactListActionItemIcon) -> Bool {
+ switch lhs {
+ case .none:
+ if case .none = rhs {
+ return true
+ } else {
+ return false
+ }
+ case let .generic(image):
+ if case .generic(image) = rhs {
+ return true
+ } else {
+ return false
+ }
+ case let .inline(image, position):
+ if case .inline(image, position) = rhs {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+}
+
+public struct ContactListAdditionalOption: Equatable {
+ public let title: String
+ public let icon: ContactListActionItemIcon
+ public let action: () -> Void
+
+ public init(title: String, icon: ContactListActionItemIcon, action: @escaping () -> Void) {
+ self.title = title
+ self.icon = icon
+ self.action = action
+ }
+
+ public static func ==(lhs: ContactListAdditionalOption, rhs: ContactListAdditionalOption) -> Bool {
+ return lhs.title == rhs.title && lhs.icon == rhs.icon
+ }
+}
+
+public enum ContactListPeerId: Hashable {
+ case peer(PeerId)
+ case deviceContact(DeviceContactStableId)
+}
+
+public enum ContactListPeer: Equatable {
+ case peer(peer: Peer, isGlobal: Bool, participantCount: Int32?)
+ case deviceContact(DeviceContactStableId, DeviceContactBasicData)
+
+ public var id: ContactListPeerId {
+ switch self {
+ case let .peer(peer, _, _):
+ return .peer(peer.id)
+ case let .deviceContact(id, _):
+ return .deviceContact(id)
+ }
+ }
+
+ public var indexName: PeerIndexNameRepresentation {
+ switch self {
+ case let .peer(peer, _, _):
+ return peer.indexName
+ case let .deviceContact(_, contact):
+ return .personName(first: contact.firstName, last: contact.lastName, addressName: "", phoneNumber: "")
+ }
+ }
+
+ public static func ==(lhs: ContactListPeer, rhs: ContactListPeer) -> Bool {
+ switch lhs {
+ case let .peer(lhsPeer, lhsIsGlobal, lhsParticipantCount):
+ if case let .peer(rhsPeer, rhsIsGlobal, rhsParticipantCount) = rhs, lhsPeer.isEqual(rhsPeer), lhsIsGlobal == rhsIsGlobal, lhsParticipantCount == rhsParticipantCount {
+ return true
+ } else {
+ return false
+ }
+ case let .deviceContact(id, contact):
+ if case .deviceContact(id, contact) = rhs {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+}
+
+public final class ContactSelectionControllerParams {
+ public let context: AccountContext
+ public let autoDismiss: Bool
+ public let title: (PresentationStrings) -> String
+ public let options: [ContactListAdditionalOption]
+ public let displayDeviceContacts: Bool
+ public let confirmation: (ContactListPeer) -> Signal
+
+ public init(context: AccountContext, autoDismiss: Bool = true, title: @escaping (PresentationStrings) -> String, options: [ContactListAdditionalOption] = [], displayDeviceContacts: Bool = false, confirmation: @escaping (ContactListPeer) -> Signal = { _ in .single(true) }) {
+ self.context = context
+ self.autoDismiss = autoDismiss
+ self.title = title
+ self.options = options
+ self.displayDeviceContacts = displayDeviceContacts
+ self.confirmation = confirmation
+ }
+}
+
public protocol SharedAccountContext: class {
var basePath: String { get }
var mainWindow: Window1? { get }
@@ -273,10 +402,11 @@ public protocol SharedAccountContext: class {
func openChatMessage(_ params: OpenChatMessageParams) -> Bool
func messageFromPreloadedChatHistoryViewForLocation(id: MessageId, location: ChatHistoryLocationInput, account: Account, chatLocation: ChatLocation, tagMask: MessageTags?) -> Signal<(MessageIndex?, Bool), NoError>
func makeOverlayAudioPlayerController(context: AccountContext, peerId: PeerId, type: MediaManagerPlayerType, initialMessageId: MessageId, initialOrder: MusicPlaybackSettingsOrder, parentNavigationController: NavigationController?) -> ViewController & OverlayAudioPlayerController
- func makePeerInfoController(context: AccountContext, peer: Peer) -> ViewController?
+ func makePeerInfoController(context: AccountContext, peer: Peer, mode: PeerInfoControllerMode) -> ViewController?
func makeDeviceContactInfoController(context: AccountContext, subject: DeviceContactInfoSubject, completed: (() -> Void)?, cancelled: (() -> Void)?) -> ViewController
func makePeersNearbyController(context: AccountContext) -> ViewController
func makeChatController(context: AccountContext, chatLocation: ChatLocation, subject: ChatControllerSubject?, botStart: ChatControllerInitialBotStart?, mode: ChatControllerPresentationMode) -> ChatController
+ func makeContactSelectionController(_ params: ContactSelectionControllerParams) -> ContactSelectionController
func navigateToChatController(_ params: NavigateToChatControllerParams)
func openExternalUrl(context: AccountContext, urlContext: OpenURLContext, url: String, forceExternal: Bool, presentationData: PresentationData, navigationController: NavigationController?, dismissInput: @escaping () -> Void)
func chatAvailableMessageActions(postbox: Postbox, accountPeerId: PeerId, messageIds: Set) -> Signal
diff --git a/submodules/AccountContext/Sources/ContactSelectionController.swift b/submodules/AccountContext/Sources/ContactSelectionController.swift
new file mode 100644
index 0000000000..381fb0e974
--- /dev/null
+++ b/submodules/AccountContext/Sources/ContactSelectionController.swift
@@ -0,0 +1,9 @@
+import Foundation
+import Display
+import SwiftSignalKit
+
+public protocol ContactSelectionController: ViewController {
+ var result: Signal { get }
+
+ func dismissSearch()
+}
diff --git a/submodules/CallListUI/CallListUI_Xcode.xcodeproj/project.pbxproj b/submodules/CallListUI/CallListUI_Xcode.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000..d8988982ba
--- /dev/null
+++ b/submodules/CallListUI/CallListUI_Xcode.xcodeproj/project.pbxproj
@@ -0,0 +1,631 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ D0C9CA4A23022CEB00FAB518 /* CallListUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9CA4823022CEB00FAB518 /* CallListUI.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D0C9CA5A23022D5F00FAB518 /* CallListCallItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5423022D5E00FAB518 /* CallListCallItem.swift */; };
+ D0C9CA5B23022D5F00FAB518 /* CallListNodeEntries.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5523022D5E00FAB518 /* CallListNodeEntries.swift */; };
+ D0C9CA5C23022D5F00FAB518 /* CallListNodeLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5623022D5E00FAB518 /* CallListNodeLocation.swift */; };
+ D0C9CA5D23022D5F00FAB518 /* CallListViewTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5723022D5E00FAB518 /* CallListViewTransition.swift */; };
+ D0C9CA5E23022D5F00FAB518 /* CallListControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5823022D5F00FAB518 /* CallListControllerNode.swift */; };
+ D0C9CA5F23022D5F00FAB518 /* CallListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA5923022D5F00FAB518 /* CallListController.swift */; };
+ D0C9CA6223022D7200FAB518 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6123022D7200FAB518 /* Foundation.framework */; };
+ D0C9CA6423022D7600FAB518 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6323022D7600FAB518 /* UIKit.framework */; };
+ D0C9CA6623022D7700FAB518 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6523022D7700FAB518 /* AsyncDisplayKit.framework */; };
+ D0C9CA6823022D7B00FAB518 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6723022D7B00FAB518 /* Postbox.framework */; };
+ D0C9CA6A23022D8100FAB518 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6923022D8100FAB518 /* Display.framework */; };
+ D0C9CA6C23022D8700FAB518 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6B23022D8700FAB518 /* SwiftSignalKit.framework */; };
+ D0C9CA6E23022D8D00FAB518 /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6D23022D8D00FAB518 /* TelegramCore.framework */; };
+ D0C9CA7023022D9500FAB518 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA6F23022D9500FAB518 /* TelegramPresentationData.framework */; };
+ D0C9CA7223022D9C00FAB518 /* ItemListUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7123022D9C00FAB518 /* ItemListUI.framework */; };
+ D0C9CA7423022DA300FAB518 /* AvatarNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7323022DA300FAB518 /* AvatarNode.framework */; };
+ D0C9CA7623022DAA00FAB518 /* TelegramStringFormatting.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7523022DAA00FAB518 /* TelegramStringFormatting.framework */; };
+ D0C9CA7823022DBA00FAB518 /* AlertUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7723022DBA00FAB518 /* AlertUI.framework */; };
+ D0C9CA7A23022DC400FAB518 /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7923022DC400FAB518 /* AccountContext.framework */; };
+ D0C9CA7C23022DCC00FAB518 /* TelegramUIPreferences.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7B23022DCC00FAB518 /* TelegramUIPreferences.framework */; };
+ D0C9CA7E23022DD900FAB518 /* TelegramNotices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7D23022DD900FAB518 /* TelegramNotices.framework */; };
+ D0C9CA8023022E1F00FAB518 /* MergeLists.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA7F23022E1F00FAB518 /* MergeLists.framework */; };
+ D0C9CA8423022E6600FAB518 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA8323022E6600FAB518 /* FrameworkBundle.swift */; };
+ D0C9CA8623022FCD00FAB518 /* CallListHoleItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9CA8523022FCD00FAB518 /* CallListHoleItem.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ D0C9CA4523022CEB00FAB518 /* CallListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CallListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA4823022CEB00FAB518 /* CallListUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallListUI.h; sourceTree = ""; };
+ D0C9CA4923022CEB00FAB518 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ D0C9CA5423022D5E00FAB518 /* CallListCallItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListCallItem.swift; sourceTree = ""; };
+ D0C9CA5523022D5E00FAB518 /* CallListNodeEntries.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListNodeEntries.swift; sourceTree = ""; };
+ D0C9CA5623022D5E00FAB518 /* CallListNodeLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListNodeLocation.swift; sourceTree = ""; };
+ D0C9CA5723022D5E00FAB518 /* CallListViewTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListViewTransition.swift; sourceTree = ""; };
+ D0C9CA5823022D5F00FAB518 /* CallListControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListControllerNode.swift; sourceTree = ""; };
+ D0C9CA5923022D5F00FAB518 /* CallListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListController.swift; sourceTree = ""; };
+ D0C9CA6123022D7200FAB518 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ D0C9CA6323022D7600FAB518 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ D0C9CA6523022D7700FAB518 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA6723022D7B00FAB518 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA6923022D8100FAB518 /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA6B23022D8700FAB518 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA6D23022D8D00FAB518 /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA6F23022D9500FAB518 /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7123022D9C00FAB518 /* ItemListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ItemListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7323022DA300FAB518 /* AvatarNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AvatarNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7523022DAA00FAB518 /* TelegramStringFormatting.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramStringFormatting.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7723022DBA00FAB518 /* AlertUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AlertUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7923022DC400FAB518 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7B23022DCC00FAB518 /* TelegramUIPreferences.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramUIPreferences.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7D23022DD900FAB518 /* TelegramNotices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramNotices.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA7F23022E1F00FAB518 /* MergeLists.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MergeLists.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA8323022E6600FAB518 /* FrameworkBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = ""; };
+ D0C9CA8523022FCD00FAB518 /* CallListHoleItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallListHoleItem.swift; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ D0C9CA4223022CEB00FAB518 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D0C9CA8023022E1F00FAB518 /* MergeLists.framework in Frameworks */,
+ D0C9CA7E23022DD900FAB518 /* TelegramNotices.framework in Frameworks */,
+ D0C9CA7C23022DCC00FAB518 /* TelegramUIPreferences.framework in Frameworks */,
+ D0C9CA7A23022DC400FAB518 /* AccountContext.framework in Frameworks */,
+ D0C9CA7823022DBA00FAB518 /* AlertUI.framework in Frameworks */,
+ D0C9CA7623022DAA00FAB518 /* TelegramStringFormatting.framework in Frameworks */,
+ D0C9CA7423022DA300FAB518 /* AvatarNode.framework in Frameworks */,
+ D0C9CA7223022D9C00FAB518 /* ItemListUI.framework in Frameworks */,
+ D0C9CA7023022D9500FAB518 /* TelegramPresentationData.framework in Frameworks */,
+ D0C9CA6E23022D8D00FAB518 /* TelegramCore.framework in Frameworks */,
+ D0C9CA6C23022D8700FAB518 /* SwiftSignalKit.framework in Frameworks */,
+ D0C9CA6A23022D8100FAB518 /* Display.framework in Frameworks */,
+ D0C9CA6823022D7B00FAB518 /* Postbox.framework in Frameworks */,
+ D0C9CA6623022D7700FAB518 /* AsyncDisplayKit.framework in Frameworks */,
+ D0C9CA6423022D7600FAB518 /* UIKit.framework in Frameworks */,
+ D0C9CA6223022D7200FAB518 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ D0C9CA3B23022CEB00FAB518 = {
+ isa = PBXGroup;
+ children = (
+ D0C9CA4923022CEB00FAB518 /* Info.plist */,
+ D0C9CA4723022CEB00FAB518 /* Sources */,
+ D0C9CA4623022CEB00FAB518 /* Products */,
+ D0C9CA6023022D6F00FAB518 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ D0C9CA4623022CEB00FAB518 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ D0C9CA4523022CEB00FAB518 /* CallListUI.framework */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ D0C9CA4723022CEB00FAB518 /* Sources */ = {
+ isa = PBXGroup;
+ children = (
+ D0C9CA5423022D5E00FAB518 /* CallListCallItem.swift */,
+ D0C9CA8523022FCD00FAB518 /* CallListHoleItem.swift */,
+ D0C9CA5923022D5F00FAB518 /* CallListController.swift */,
+ D0C9CA5823022D5F00FAB518 /* CallListControllerNode.swift */,
+ D0C9CA5523022D5E00FAB518 /* CallListNodeEntries.swift */,
+ D0C9CA5623022D5E00FAB518 /* CallListNodeLocation.swift */,
+ D0C9CA5723022D5E00FAB518 /* CallListViewTransition.swift */,
+ D0C9CA8323022E6600FAB518 /* FrameworkBundle.swift */,
+ D0C9CA4823022CEB00FAB518 /* CallListUI.h */,
+ );
+ path = Sources;
+ sourceTree = "";
+ };
+ D0C9CA6023022D6F00FAB518 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D0C9CA7F23022E1F00FAB518 /* MergeLists.framework */,
+ D0C9CA7D23022DD900FAB518 /* TelegramNotices.framework */,
+ D0C9CA7B23022DCC00FAB518 /* TelegramUIPreferences.framework */,
+ D0C9CA7923022DC400FAB518 /* AccountContext.framework */,
+ D0C9CA7723022DBA00FAB518 /* AlertUI.framework */,
+ D0C9CA7523022DAA00FAB518 /* TelegramStringFormatting.framework */,
+ D0C9CA7323022DA300FAB518 /* AvatarNode.framework */,
+ D0C9CA7123022D9C00FAB518 /* ItemListUI.framework */,
+ D0C9CA6F23022D9500FAB518 /* TelegramPresentationData.framework */,
+ D0C9CA6D23022D8D00FAB518 /* TelegramCore.framework */,
+ D0C9CA6B23022D8700FAB518 /* SwiftSignalKit.framework */,
+ D0C9CA6923022D8100FAB518 /* Display.framework */,
+ D0C9CA6723022D7B00FAB518 /* Postbox.framework */,
+ D0C9CA6523022D7700FAB518 /* AsyncDisplayKit.framework */,
+ D0C9CA6323022D7600FAB518 /* UIKit.framework */,
+ D0C9CA6123022D7200FAB518 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ D0C9CA4023022CEB00FAB518 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D0C9CA4A23022CEB00FAB518 /* CallListUI.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ D0C9CA4423022CEB00FAB518 /* CallListUI */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D0C9CA4D23022CEB00FAB518 /* Build configuration list for PBXNativeTarget "CallListUI" */;
+ buildPhases = (
+ D0C9CA4023022CEB00FAB518 /* Headers */,
+ D0C9CA4123022CEB00FAB518 /* Sources */,
+ D0C9CA4223022CEB00FAB518 /* Frameworks */,
+ D0C9CA4323022CEB00FAB518 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CallListUI;
+ productName = CallListUI;
+ productReference = D0C9CA4523022CEB00FAB518 /* CallListUI.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ D0C9CA3C23022CEB00FAB518 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ DefaultBuildSystemTypeForWorkspace = Latest;
+ LastUpgradeCheck = 1030;
+ ORGANIZATIONNAME = "Telegram Messenger LLP";
+ TargetAttributes = {
+ D0C9CA4423022CEB00FAB518 = {
+ CreatedOnToolsVersion = 10.3;
+ LastSwiftMigration = 1030;
+ };
+ };
+ };
+ buildConfigurationList = D0C9CA3F23022CEB00FAB518 /* Build configuration list for PBXProject "CallListUI_Xcode" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = D0C9CA3B23022CEB00FAB518;
+ productRefGroup = D0C9CA4623022CEB00FAB518 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ D0C9CA4423022CEB00FAB518 /* CallListUI */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ D0C9CA4323022CEB00FAB518 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ D0C9CA4123022CEB00FAB518 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D0C9CA8623022FCD00FAB518 /* CallListHoleItem.swift in Sources */,
+ D0C9CA5C23022D5F00FAB518 /* CallListNodeLocation.swift in Sources */,
+ D0C9CA5D23022D5F00FAB518 /* CallListViewTransition.swift in Sources */,
+ D0C9CA5B23022D5F00FAB518 /* CallListNodeEntries.swift in Sources */,
+ D0C9CA5F23022D5F00FAB518 /* CallListController.swift in Sources */,
+ D0C9CA5E23022D5F00FAB518 /* CallListControllerNode.swift in Sources */,
+ D0C9CA8423022E6600FAB518 /* FrameworkBundle.swift in Sources */,
+ D0C9CA5A23022D5F00FAB518 /* CallListCallItem.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ D0C9CA4B23022CEB00FAB518 /* 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;
+ };
+ D0C9CA4C23022CEB00FAB518 /* 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;
+ };
+ D0C9CA4E23022CEB00FAB518 /* 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.CallListUI;
+ 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;
+ };
+ D0C9CA4F23022CEB00FAB518 /* 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.CallListUI;
+ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SKIP_INSTALL = YES;
+ SWIFT_VERSION = 5.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = ReleaseAppStoreLLC;
+ };
+ D0C9CA5023022D2300FAB518 /* 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;
+ };
+ D0C9CA5123022D2300FAB518 /* 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.CallListUI;
+ 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;
+ };
+ D0C9CA5223022D3100FAB518 /* 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;
+ };
+ D0C9CA5323022D3100FAB518 /* 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.CallListUI;
+ 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 */
+ D0C9CA3F23022CEB00FAB518 /* Build configuration list for PBXProject "CallListUI_Xcode" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D0C9CA4B23022CEB00FAB518 /* DebugAppStoreLLC */,
+ D0C9CA5023022D2300FAB518 /* DebugHockeyapp */,
+ D0C9CA4C23022CEB00FAB518 /* ReleaseAppStoreLLC */,
+ D0C9CA5223022D3100FAB518 /* ReleaseHockeyappInternal */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = ReleaseAppStoreLLC;
+ };
+ D0C9CA4D23022CEB00FAB518 /* Build configuration list for PBXNativeTarget "CallListUI" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D0C9CA4E23022CEB00FAB518 /* DebugAppStoreLLC */,
+ D0C9CA5123022D2300FAB518 /* DebugHockeyapp */,
+ D0C9CA4F23022CEB00FAB518 /* ReleaseAppStoreLLC */,
+ D0C9CA5323022D3100FAB518 /* ReleaseHockeyappInternal */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = ReleaseAppStoreLLC;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = D0C9CA3C23022CEB00FAB518 /* Project object */;
+}
diff --git a/submodules/CallListUI/Info.plist b/submodules/CallListUI/Info.plist
new file mode 100644
index 0000000000..e1fe4cfb7b
--- /dev/null
+++ b/submodules/CallListUI/Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ $(CURRENT_PROJECT_VERSION)
+
+
diff --git a/submodules/TelegramUI/TelegramUI/CallListCallItem.swift b/submodules/CallListUI/Sources/CallListCallItem.swift
similarity index 100%
rename from submodules/TelegramUI/TelegramUI/CallListCallItem.swift
rename to submodules/CallListUI/Sources/CallListCallItem.swift
diff --git a/submodules/TelegramUI/TelegramUI/CallListController.swift b/submodules/CallListUI/Sources/CallListController.swift
similarity index 96%
rename from submodules/TelegramUI/TelegramUI/CallListController.swift
rename to submodules/CallListUI/Sources/CallListController.swift
index 7855433804..fa6e82e03e 100644
--- a/submodules/TelegramUI/TelegramUI/CallListController.swift
+++ b/submodules/CallListUI/Sources/CallListController.swift
@@ -54,12 +54,7 @@ public final class CallListController: ViewController {
if case .tab = self.mode {
self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: PresentationResourcesRootController.navigationCallIcon(self.presentationData.theme), style: .plain, target: self, action: #selector(self.callPressed))
- let icon: UIImage?
- if (useSpecialTabBarIcons()) {
- icon = UIImage(bundleImageName: "Chat List/Tabs/NY/IconCalls")
- } else {
- icon = UIImage(bundleImageName: "Chat List/Tabs/IconCalls")
- }
+ let icon: UIImage? = UIImage(bundleImageName: "Chat List/Tabs/IconCalls")
self.tabBarItem.title = self.presentationData.strings.Calls_TabTitle
self.tabBarItem.image = icon
@@ -150,9 +145,8 @@ public final class CallListController: ViewController {
let _ = (strongSelf.context.account.postbox.loadedPeerWithId(peerId)
|> take(1)
|> deliverOnMainQueue).start(next: { peer in
- if let strongSelf = self {
- let infoController = userInfoController(context: strongSelf.context, peerId: peer.id, mode: .calls(messages: messages))
- (strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
+ if let strongSelf = self, let controller = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .calls(messages: messages)) {
+ (strongSelf.navigationController as? NavigationController)?.pushViewController(controller)
}
})
}
@@ -198,7 +192,7 @@ public final class CallListController: ViewController {
}
@objc func callPressed() {
- let controller = ContactSelectionController(context: self.context, title: { $0.Calls_NewCall })
+ let controller = self.context.sharedContext.makeContactSelectionController(ContactSelectionControllerParams(context: self.context, title: { $0.Calls_NewCall }))
self.createActionDisposable.set((controller.result
|> take(1)
|> deliverOnMainQueue).start(next: { [weak controller, weak self] peer in
diff --git a/submodules/TelegramUI/TelegramUI/CallListControllerNode.swift b/submodules/CallListUI/Sources/CallListControllerNode.swift
similarity index 99%
rename from submodules/TelegramUI/TelegramUI/CallListControllerNode.swift
rename to submodules/CallListUI/Sources/CallListControllerNode.swift
index d97b02deee..d4a62d6d39 100644
--- a/submodules/TelegramUI/TelegramUI/CallListControllerNode.swift
+++ b/submodules/CallListUI/Sources/CallListControllerNode.swift
@@ -123,7 +123,7 @@ private func mappedInsertEntries(account: Account, showSettings: Bool, nodeInter
case let .messageEntry(topMessage, messages, theme, strings, dateTimeFormat, editing, hasActiveRevealControls):
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListCallItem(theme: theme, strings: strings, dateTimeFormat: dateTimeFormat, account: account, style: showSettings ? .blocks : .plain, topMessage: topMessage, messages: messages, editing: editing, revealed: hasActiveRevealControls, interaction: nodeInteraction), directionHint: entry.directionHint)
case let .holeEntry(_, theme):
- return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint)
+ return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListHoleItem(theme: theme), directionHint: entry.directionHint)
}
}
}
@@ -140,7 +140,7 @@ private func mappedUpdateEntries(account: Account, showSettings: Bool, nodeInter
case let .messageEntry(topMessage, messages, theme, strings, dateTimeFormat, editing, hasActiveRevealControls):
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListCallItem(theme: theme, strings: strings, dateTimeFormat: dateTimeFormat, account: account, style: showSettings ? .blocks : .plain, topMessage: topMessage, messages: messages, editing: editing, revealed: hasActiveRevealControls, interaction: nodeInteraction), directionHint: entry.directionHint)
case let .holeEntry(_, theme):
- return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint)
+ return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListHoleItem(theme: theme), directionHint: entry.directionHint)
}
}
}
diff --git a/submodules/CallListUI/Sources/CallListHoleItem.swift b/submodules/CallListUI/Sources/CallListHoleItem.swift
new file mode 100644
index 0000000000..a75785810e
--- /dev/null
+++ b/submodules/CallListUI/Sources/CallListHoleItem.swift
@@ -0,0 +1,128 @@
+import Foundation
+import UIKit
+import AsyncDisplayKit
+import Postbox
+import Display
+import SwiftSignalKit
+import TelegramPresentationData
+
+private let titleFont = Font.regular(17.0)
+
+class CallListHoleItem: ListViewItem {
+ let theme: PresentationTheme
+
+ let selectable: Bool = false
+
+ init(theme: PresentationTheme) {
+ self.theme = theme
+ }
+
+ func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) {
+ async {
+ let node = CallListHoleItemNode()
+ node.relativePosition = (first: previousItem == nil, last: nextItem == nil)
+ node.insets = UIEdgeInsets()
+ node.layoutForParams(params, item: self, previousItem: previousItem, nextItem: nextItem)
+ Queue.mainQueue().async {
+ completion(node, {
+ return (nil, { _ in })
+ })
+ }
+ }
+ }
+
+ 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 {
+ assert(node() is CallListHoleItemNode)
+ if let nodeValue = node() as? CallListHoleItemNode {
+
+ let layout = nodeValue.asyncLayout()
+ async {
+ let first = previousItem == nil
+ let last = nextItem == nil
+
+ let (nodeLayout, apply) = layout(self, params, first, last)
+ Queue.mainQueue().async {
+ completion(nodeLayout, { _ in
+ apply()
+ if let nodeValue = node() as? CallListHoleItemNode {
+ nodeValue.updateBackgroundAndSeparatorsLayout()
+ }
+ })
+ }
+ }
+ }
+ }
+ }
+}
+
+private let separatorHeight = 1.0 / UIScreen.main.scale
+
+class CallListHoleItemNode: ListViewItemNode {
+ let separatorNode: ASDisplayNode
+ let labelNode: TextNode
+
+ var relativePosition: (first: Bool, last: Bool) = (false, false)
+
+ required init() {
+ self.separatorNode = ASDisplayNode()
+ self.separatorNode.backgroundColor = UIColor(rgb: 0xc8c7cc)
+ self.separatorNode.isLayerBacked = true
+
+ self.labelNode = TextNode()
+
+ super.init(layerBacked: false, dynamicBounce: false)
+
+ self.addSubnode(self.separatorNode)
+ self.addSubnode(self.labelNode)
+ }
+
+ override func layoutForParams(_ params: ListViewItemLayoutParams, item: ListViewItem, previousItem: ListViewItem?, nextItem: ListViewItem?) {
+ let layout = self.asyncLayout()
+ let (_, apply) = layout(item as! CallListHoleItem, params, self.relativePosition.first, self.relativePosition.last)
+ apply()
+ }
+
+ func asyncLayout() -> (_ item: CallListHoleItem, _ params: ListViewItemLayoutParams, _ first: Bool, _ last: Bool) -> (ListViewItemNodeLayout, () -> Void) {
+ let labelNodeLayout = TextNode.asyncLayout(self.labelNode)
+
+ return { item, params, first, last in
+ let baseWidth = params.width - params.leftInset - params.rightInset
+
+ let (labelLayout, labelApply) = labelNodeLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: "", font: titleFont, textColor: item.theme.chatList.messageTextColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: baseWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
+
+ let insets = UIEdgeInsets()
+ let layout = ListViewItemNodeLayout(contentSize: CGSize(width: params.width, height: 68.0), insets: insets)
+
+ let separatorInset: CGFloat
+ if last {
+ separatorInset = 0.0
+ } else {
+ separatorInset = 80.0 + params.leftInset
+ }
+
+ return (layout, { [weak self] in
+ if let strongSelf = self {
+ strongSelf.relativePosition = (first, last)
+
+ let _ = labelApply()
+
+ strongSelf.separatorNode.backgroundColor = item.theme.chatList.itemSeparatorColor
+
+ strongSelf.labelNode.frame = CGRect(origin: CGPoint(x: floor((params.width - labelLayout.size.width) / 2.0), y: floor((layout.contentSize.height - labelLayout.size.height) / 2.0)), size: labelLayout.size)
+
+ strongSelf.separatorNode.frame = CGRect(origin: CGPoint(x: separatorInset, y: 68.0 - separatorHeight), size: CGSize(width: params.width - separatorInset, height: separatorHeight))
+
+ strongSelf.contentSize = layout.contentSize
+ strongSelf.insets = layout.insets
+ strongSelf.updateBackgroundAndSeparatorsLayout()
+ }
+ })
+ }
+ }
+
+ func updateBackgroundAndSeparatorsLayout() {
+ //let size = self.bounds.size
+ //let insets = self.insets
+ }
+}
diff --git a/submodules/TelegramUI/TelegramUI/CallListNodeEntries.swift b/submodules/CallListUI/Sources/CallListNodeEntries.swift
similarity index 100%
rename from submodules/TelegramUI/TelegramUI/CallListNodeEntries.swift
rename to submodules/CallListUI/Sources/CallListNodeEntries.swift
diff --git a/submodules/TelegramUI/TelegramUI/CallListNodeLocation.swift b/submodules/CallListUI/Sources/CallListNodeLocation.swift
similarity index 100%
rename from submodules/TelegramUI/TelegramUI/CallListNodeLocation.swift
rename to submodules/CallListUI/Sources/CallListNodeLocation.swift
diff --git a/submodules/CallListUI/Sources/CallListUI.h b/submodules/CallListUI/Sources/CallListUI.h
new file mode 100644
index 0000000000..0104a06195
--- /dev/null
+++ b/submodules/CallListUI/Sources/CallListUI.h
@@ -0,0 +1,19 @@
+//
+// CallListUI.h
+// CallListUI
+//
+// Created by Peter on 8/13/19.
+// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
+//
+
+#import
+
+//! Project version number for CallListUI.
+FOUNDATION_EXPORT double CallListUIVersionNumber;
+
+//! Project version string for CallListUI.
+FOUNDATION_EXPORT const unsigned char CallListUIVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+
diff --git a/submodules/TelegramUI/TelegramUI/CallListViewTransition.swift b/submodules/CallListUI/Sources/CallListViewTransition.swift
similarity index 100%
rename from submodules/TelegramUI/TelegramUI/CallListViewTransition.swift
rename to submodules/CallListUI/Sources/CallListViewTransition.swift
diff --git a/submodules/CallListUI/Sources/FrameworkBundle.swift b/submodules/CallListUI/Sources/FrameworkBundle.swift
new file mode 100644
index 0000000000..8ca13d7d92
--- /dev/null
+++ b/submodules/CallListUI/Sources/FrameworkBundle.swift
@@ -0,0 +1,13 @@
+import Foundation
+import UIKit
+
+private class FrameworkBundleClass: NSObject {
+}
+
+let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self)
+
+extension UIImage {
+ convenience init?(bundleImageName: String) {
+ self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil)
+ }
+}
diff --git a/submodules/ContactListUI/Sources/ContactListActionItem.swift b/submodules/ContactListUI/Sources/ContactListActionItem.swift
index b933cce31a..e2a1897f71 100644
--- a/submodules/ContactListUI/Sources/ContactListActionItem.swift
+++ b/submodules/ContactListUI/Sources/ContactListActionItem.swift
@@ -6,57 +6,13 @@ import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
import ContactsPeerItem
-
-public enum ContactListActionItemInlineIconPosition {
- case left
- case right
-}
+import AccountContext
public enum ContactListActionItemHighlight {
case cell
case alpha
}
-public enum ContactListActionItemIcon : Equatable {
- case none
- case generic(UIImage)
- case inline(UIImage, ContactListActionItemInlineIconPosition)
-
- var image: UIImage? {
- switch self {
- case .none:
- return nil
- case let .generic(image):
- return image
- case let .inline(image, _):
- return image
- }
- }
-
- public static func ==(lhs: ContactListActionItemIcon, rhs: ContactListActionItemIcon) -> Bool {
- switch lhs {
- case .none:
- if case .none = rhs {
- return true
- } else {
- return false
- }
- case let .generic(image):
- if case .generic(image) = rhs {
- return true
- } else {
- return false
- }
- case let .inline(image, position):
- if case .inline(image, position) = rhs {
- return true
- } else {
- return false
- }
- }
- }
-}
-
class ContactListActionItem: ListViewItem, ListViewItemWithHeader {
let theme: PresentationTheme
let title: String
diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift
index 7075726455..4184cf192e 100644
--- a/submodules/ContactListUI/Sources/ContactListNode.swift
+++ b/submodules/ContactListUI/Sources/ContactListNode.swift
@@ -115,51 +115,6 @@ enum ContactListAnimation {
case insertion
}
-public enum ContactListPeerId: Hashable {
- case peer(PeerId)
- case deviceContact(DeviceContactStableId)
-}
-
-public enum ContactListPeer: Equatable {
- case peer(peer: Peer, isGlobal: Bool, participantCount: Int32?)
- case deviceContact(DeviceContactStableId, DeviceContactBasicData)
-
- public var id: ContactListPeerId {
- switch self {
- case let .peer(peer, _, _):
- return .peer(peer.id)
- case let .deviceContact(id, _):
- return .deviceContact(id)
- }
- }
-
- public var indexName: PeerIndexNameRepresentation {
- switch self {
- case let .peer(peer, _, _):
- return peer.indexName
- case let .deviceContact(_, contact):
- return .personName(first: contact.firstName, last: contact.lastName, addressName: "", phoneNumber: "")
- }
- }
-
- public static func ==(lhs: ContactListPeer, rhs: ContactListPeer) -> Bool {
- switch lhs {
- case let .peer(lhsPeer, lhsIsGlobal, lhsParticipantCount):
- if case let .peer(rhsPeer, rhsIsGlobal, rhsParticipantCount) = rhs, lhsPeer.isEqual(rhsPeer), lhsIsGlobal == rhsIsGlobal, lhsParticipantCount == rhsParticipantCount {
- return true
- } else {
- return false
- }
- case let .deviceContact(id, contact):
- if case .deviceContact(id, contact) = rhs {
- return true
- } else {
- return false
- }
- }
- }
-}
-
private enum ContactListNodeEntry: Comparable, Identifiable {
case search(PresentationTheme, PresentationStrings)
case sort(PresentationTheme, PresentationStrings, ContactsSortOrder)
@@ -688,22 +643,6 @@ private struct ContactsListNodeTransition {
let animation: ContactListAnimation
}
-public struct ContactListAdditionalOption: Equatable {
- public let title: String
- public let icon: ContactListActionItemIcon
- public let action: () -> Void
-
- public init(title: String, icon: ContactListActionItemIcon, action: @escaping () -> Void) {
- self.title = title
- self.icon = icon
- self.action = action
- }
-
- public static func ==(lhs: ContactListAdditionalOption, rhs: ContactListAdditionalOption) -> Bool {
- return lhs.title == rhs.title && lhs.icon == rhs.icon
- }
-}
-
public enum ContactListPresentation {
case orderedByPresence(options: [ContactListAdditionalOption])
case natural(options: [ContactListAdditionalOption], includeChatList: Bool)
diff --git a/submodules/ContactListUI/Sources/ContactsController.swift b/submodules/ContactListUI/Sources/ContactsController.swift
index e71a9abb14..0d20dfbf71 100644
--- a/submodules/ContactListUI/Sources/ContactsController.swift
+++ b/submodules/ContactListUI/Sources/ContactsController.swift
@@ -525,7 +525,7 @@ public class ContactsController: ViewController {
return
}
if let peer = peer {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
} else {
diff --git a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
index 590a0952c5..e1d217d93d 100644
--- a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
@@ -1211,7 +1211,7 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate {
let _ = (strongSelf.context.account.postbox.loadedPeerWithId(peerId)
|> deliverOnMainQueue).start(next: { peer in
if let strongSelf = self {
- if let controller = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let controller = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
strongSelf.getNavigationController()?.pushViewController(controller)
}
}
diff --git a/submodules/PassportUI/Sources/SecureIdAuthController.swift b/submodules/PassportUI/Sources/SecureIdAuthController.swift
index ce49d5a7f2..563dad667a 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthController.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthController.swift
@@ -327,7 +327,7 @@ public final class SecureIdAuthController: ViewController {
guard let strongSelf = self else {
return
}
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
})
diff --git a/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift b/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift
index 02c680514f..5552cd9881 100644
--- a/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift
+++ b/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift
@@ -255,7 +255,7 @@ public func blockedPeersController(context: AccountContext, blockedPeersContext:
}
}))
}, openPeer: { peer in
- if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
pushControllerImpl?(controller)
}
})
diff --git a/submodules/TelegramUI/TelegramUI/ChannelBlacklistController.swift b/submodules/TelegramUI/TelegramUI/ChannelBlacklistController.swift
index a1d214dd71..51804ad3cb 100644
--- a/submodules/TelegramUI/TelegramUI/ChannelBlacklistController.swift
+++ b/submodules/TelegramUI/TelegramUI/ChannelBlacklistController.swift
@@ -361,7 +361,7 @@ public func channelBlacklistController(context: AccountContext, peerId: PeerId)
}
items.append(ActionSheetButtonItem(title: presentationData.strings.GroupRemoved_ViewUserInfo, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: participant.peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: participant.peer, mode: .generic) {
pushControllerImpl?(infoController)
}
}))
diff --git a/submodules/TelegramUI/TelegramUI/ChannelMembersController.swift b/submodules/TelegramUI/TelegramUI/ChannelMembersController.swift
index ab11a51288..7228103a42 100644
--- a/submodules/TelegramUI/TelegramUI/ChannelMembersController.swift
+++ b/submodules/TelegramUI/TelegramUI/ChannelMembersController.swift
@@ -445,7 +445,7 @@ public func channelMembersController(context: AccountContext, peerId: PeerId) ->
}
}))
}, openPeer: { peer in
- if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
pushControllerImpl?(controller)
}
}, inviteViaLink: {
@@ -497,9 +497,8 @@ public func channelMembersController(context: AccountContext, peerId: PeerId) ->
return state.withUpdatedSearchingMembers(false)
}
}, openPeer: { peer, _ in
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
pushControllerImpl?(infoController)
- // arguments.pushController(infoController)
}
}, present: { c, a in
presentControllerImpl?(c, a)
diff --git a/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift b/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift
index fdad9bbf62..659b16319e 100644
--- a/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift
+++ b/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift
@@ -654,7 +654,7 @@ public func channelPermissionsController(context: AccountContext, peerId origina
}), ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
})
}, openPeerInfo: { peer in
- if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
pushControllerImpl?(controller)
}
}, openKicked: {
diff --git a/submodules/TelegramUI/TelegramUI/ChatController.swift b/submodules/TelegramUI/TelegramUI/ChatController.swift
index 4e4cbf9543..19038b69c0 100644
--- a/submodules/TelegramUI/TelegramUI/ChatController.swift
+++ b/submodules/TelegramUI/TelegramUI/ChatController.swift
@@ -4650,7 +4650,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|> take(1)
|> deliverOnMainQueue).start(next: { [weak self] peerView in
if let strongSelf = self, let peer = peerView.peers[peerView.peerId], peer.restrictionText == nil && !strongSelf.presentationInterfaceState.isNotAccessible {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
}
@@ -5101,7 +5101,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
private func presentContactPicker() {
- let contactsController = ContactSelectionController(context: self.context, title: { $0.Contacts_Title }, displayDeviceContacts: true)
+ let contactsController = ContactSelectionControllerImpl(ContactSelectionControllerParams(context: self.context, title: { $0.Contacts_Title }, displayDeviceContacts: true))
self.chatDisplayNode.dismissInput()
self.present(contactsController, in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
self.controllerNavigationDisposable.set((contactsController.result |> deliverOnMainQueue).start(next: { [weak self] peer in
@@ -6059,7 +6059,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
self.navigationActionDisposable.set((peerSignal |> take(1) |> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self, let peer = peer {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
}
@@ -6464,7 +6464,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|> take(1)
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self, peer.restrictionText == nil {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
}
diff --git a/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift b/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift
index 70af4fab8c..1bf5f6d646 100644
--- a/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift
+++ b/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift
@@ -658,7 +658,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
if peer is TelegramChannel, let navigationController = strongSelf.getNavigationController() {
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peer.id), animated: true))
} else {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
strongSelf.pushController(infoController)
}
}
@@ -680,7 +680,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self {
if let peer = peer {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
strongSelf.pushController(infoController)
}
}
diff --git a/submodules/TelegramUI/TelegramUI/ComposeController.swift b/submodules/TelegramUI/TelegramUI/ComposeController.swift
index 8f8ce5f08b..9b7aff366d 100644
--- a/submodules/TelegramUI/TelegramUI/ComposeController.swift
+++ b/submodules/TelegramUI/TelegramUI/ComposeController.swift
@@ -141,7 +141,7 @@ public class ComposeController: ViewController {
self.contactsNode.openCreateNewSecretChat = { [weak self] in
if let strongSelf = self {
- let controller = ContactSelectionController(context: strongSelf.context, title: { $0.Compose_NewEncryptedChatTitle })
+ let controller = ContactSelectionControllerImpl(ContactSelectionControllerParams(context: strongSelf.context, title: { $0.Compose_NewEncryptedChatTitle }))
strongSelf.createActionDisposable.set((controller.result
|> take(1)
|> deliverOnMainQueue).start(next: { [weak controller] peer in
diff --git a/submodules/TelegramUI/TelegramUI/ContactSelectionController.swift b/submodules/TelegramUI/TelegramUI/ContactSelectionController.swift
index 6183201b29..1c263c4941 100644
--- a/submodules/TelegramUI/TelegramUI/ContactSelectionController.swift
+++ b/submodules/TelegramUI/TelegramUI/ContactSelectionController.swift
@@ -11,7 +11,7 @@ import AccountContext
import ContactListUI
import SearchUI
-class ContactSelectionController: ViewController, PresentableController {
+class ContactSelectionControllerImpl: ViewController, ContactSelectionController, PresentableController {
private let context: AccountContext
private let autoDismiss: Bool
@@ -67,13 +67,13 @@ class ContactSelectionController: ViewController, PresentableController {
}
}
- init(context: AccountContext, autoDismiss: Bool = true, title: @escaping (PresentationStrings) -> String, options: [ContactListAdditionalOption] = [], displayDeviceContacts: Bool = false, confirmation: @escaping (ContactListPeer) -> Signal = { _ in .single(true) }) {
- self.context = context
- self.autoDismiss = autoDismiss
- self.titleProducer = title
- self.options = options
- self.displayDeviceContacts = displayDeviceContacts
- self.confirmation = confirmation
+ init(_ params: ContactSelectionControllerParams) {
+ self.context = params.context
+ self.autoDismiss = params.autoDismiss
+ self.titleProducer = params.title
+ self.options = params.options
+ self.displayDeviceContacts = params.displayDeviceContacts
+ self.confirmation = params.confirmation
self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
diff --git a/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift b/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift
index cd562c4e94..ecb652b84e 100644
--- a/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift
+++ b/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift
@@ -1289,7 +1289,7 @@ public func deviceContactInfoController(context: AccountContext, subject: Device
}
private func addContactToExisting(context: AccountContext, parentController: ViewController, contactData: DeviceContactExtendedData, completion: @escaping (Peer?, DeviceContactStableId, DeviceContactExtendedData) -> Void) {
- let contactsController = ContactSelectionController(context: context, title: { $0.Contacts_Title }, displayDeviceContacts: true)
+ let contactsController = ContactSelectionControllerImpl(ContactSelectionControllerParams(context: context, title: { $0.Contacts_Title }, displayDeviceContacts: true))
parentController.present(contactsController, in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
let _ = (contactsController.result
|> deliverOnMainQueue).start(next: { peer in
diff --git a/submodules/TelegramUI/TelegramUI/GroupInfoController.swift b/submodules/TelegramUI/TelegramUI/GroupInfoController.swift
index 2e81ef77f2..aa2171b736 100644
--- a/submodules/TelegramUI/TelegramUI/GroupInfoController.swift
+++ b/submodules/TelegramUI/TelegramUI/GroupInfoController.swift
@@ -569,7 +569,7 @@ private enum GroupInfoEntry: ItemListNodeEntry {
}))
}
return ItemListPeerItem(theme: theme, strings: strings, dateTimeFormat: dateTimeFormat, nameDisplayOrder: nameDisplayOrder, account: arguments.context.account, peer: peer, presence: presence, text: .presence, label: label == nil ? .none : .text(label!), editing: editing, revealOptions: ItemListPeerItemRevealOptions(options: options), switchValue: nil, enabled: enabled, selectable: selectable, sectionId: self.section, action: {
- if let infoController = arguments.context.sharedContext.makePeerInfoController(context: arguments.context, peer: peer), selectable {
+ if let infoController = arguments.context.sharedContext.makePeerInfoController(context: arguments.context, peer: peer, mode: .generic), selectable {
arguments.pushController(infoController)
}
}, setPeerIdWithRevealedOptions: { peerId, fromPeerId in
@@ -1596,13 +1596,13 @@ public func groupInfoController(context: AccountContext, peerId originalPeerId:
let contactsController: ViewController
if peerView.peerId.namespace == Namespaces.Peer.CloudGroup {
- contactsController = ContactSelectionController(context: context, autoDismiss: false, title: { $0.GroupInfo_AddParticipantTitle }, options: options, confirmation: { peer in
+ contactsController = ContactSelectionControllerImpl(ContactSelectionControllerParams(context: context, autoDismiss: false, title: { $0.GroupInfo_AddParticipantTitle }, options: options, confirmation: { peer in
if let confirmationImpl = confirmationImpl, case let .peer(peer, _, _) = peer {
return confirmationImpl(peer.id)
} else {
return .single(false)
}
- })
+ }))
} else {
contactsController = ContactMultiselectionController(context: context, mode: .peerSelection(searchChatList: false, searchGroups: false), options: options, filters: [.excludeSelf, .disable(recentIds)])
}
@@ -1803,7 +1803,7 @@ public func groupInfoController(context: AccountContext, peerId originalPeerId:
}
presentControllerImpl?(contactsController, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
- if let contactsController = contactsController as? ContactSelectionController {
+ if let contactsController = contactsController as? ContactSelectionControllerImpl {
selectAddMemberDisposable.set((contactsController.result
|> deliverOnMainQueue).start(next: { [weak contactsController] memberPeer in
guard let memberPeer = memberPeer else {
@@ -2243,7 +2243,7 @@ public func groupInfoController(context: AccountContext, peerId originalPeerId:
return state.withUpdatedSearchingMembers(false)
}
}, openPeer: { peer, _ in
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
arguments.pushController(infoController)
}
}, present: { c, a in
diff --git a/submodules/TelegramUI/TelegramUI/OpenAddContact.swift b/submodules/TelegramUI/TelegramUI/OpenAddContact.swift
index c03e7e4e29..c3dbe4f197 100644
--- a/submodules/TelegramUI/TelegramUI/OpenAddContact.swift
+++ b/submodules/TelegramUI/TelegramUI/OpenAddContact.swift
@@ -15,7 +15,7 @@ func openAddContact(context: AccountContext, firstName: String = "", lastName: S
let contactData = DeviceContactExtendedData(basicData: DeviceContactBasicData(firstName: firstName, lastName: lastName, phoneNumbers: [DeviceContactPhoneNumberData(label: label, value: phoneNumber)]), middleName: "", prefix: "", suffix: "", organization: "", jobTitle: "", department: "", emailAddresses: [], urls: [], addresses: [], birthdayDate: nil, socialProfiles: [], instantMessagingProfiles: [])
present(deviceContactInfoController(context: context, subject: .create(peer: nil, contactData: contactData, isSharing: false, shareViaException: false, completion: { peer, stableId, contactData in
if let peer = peer {
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
pushController(infoController)
}
} else {
diff --git a/submodules/TelegramUI/TelegramUI/OpenUrl.swift b/submodules/TelegramUI/TelegramUI/OpenUrl.swift
index 992c70c1f7..dff3178505 100644
--- a/submodules/TelegramUI/TelegramUI/OpenUrl.swift
+++ b/submodules/TelegramUI/TelegramUI/OpenUrl.swift
@@ -193,7 +193,7 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
case .info:
let _ = (context.account.postbox.loadedPeerWithId(peerId)
|> deliverOnMainQueue).start(next: { peer in
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
context.sharedContext.applicationBindings.dismissNativeController()
navigationController?.pushViewController(infoController)
}
@@ -474,7 +474,7 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
return transaction.getPeer(PeerId(namespace: Namespaces.Peer.CloudUser, id: idValue))
}
|> deliverOnMainQueue).start(next: { peer in
- if let peer = peer, let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let peer = peer, let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
navigationController?.pushViewController(controller)
}
})
diff --git a/submodules/TelegramUI/TelegramUI/PeerInfoController.swift b/submodules/TelegramUI/TelegramUI/PeerInfoController.swift
index 3787ed9c6f..3db64333ce 100644
--- a/submodules/TelegramUI/TelegramUI/PeerInfoController.swift
+++ b/submodules/TelegramUI/TelegramUI/PeerInfoController.swift
@@ -6,7 +6,7 @@ import SwiftSignalKit
import TelegramCore
import AccountContext
-func peerInfoControllerImpl(context: AccountContext, peer: Peer) -> ViewController? {
+func peerInfoControllerImpl(context: AccountContext, peer: Peer, mode: PeerInfoControllerMode) -> ViewController? {
if let _ = peer as? TelegramGroup {
return groupInfoController(context: context, peerId: peer.id)
} else if let channel = peer as? TelegramChannel {
@@ -16,7 +16,7 @@ func peerInfoControllerImpl(context: AccountContext, peer: Peer) -> ViewControll
return channelInfoController(context: context, peerId: peer.id)
}
} else if peer is TelegramUser || peer is TelegramSecretChat {
- return userInfoController(context: context, peerId: peer.id)
+ return userInfoController(context: context, peerId: peer.id, mode: mode)
}
return nil
}
diff --git a/submodules/TelegramUI/TelegramUI/PeerMediaCollectionController.swift b/submodules/TelegramUI/TelegramUI/PeerMediaCollectionController.swift
index 7dbe54058f..1705e544d1 100644
--- a/submodules/TelegramUI/TelegramUI/PeerMediaCollectionController.swift
+++ b/submodules/TelegramUI/TelegramUI/PeerMediaCollectionController.swift
@@ -608,7 +608,7 @@ public class PeerMediaCollectionController: TelegramBaseController {
|> take(1)
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self, peer.restrictionText == nil {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic) {
(strongSelf.navigationController as? NavigationController)?.pushViewController(infoController)
}
}
diff --git a/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift b/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift
index 0cf988e8a3..4110931c60 100644
--- a/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift
+++ b/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift
@@ -337,7 +337,7 @@ public func selectivePrivacyPeersController(context: AccountContext, title: Stri
return transaction.getPeer(peerId)
}
|> deliverOnMainQueue).start(next: { peer in
- guard let peer = peer, let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer) else {
+ guard let peer = peer, let controller = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) else {
return
}
pushControllerImpl?(controller)
diff --git a/submodules/TelegramUI/TelegramUI/SettingsController.swift b/submodules/TelegramUI/TelegramUI/SettingsController.swift
index 2239c9eb62..9bd97cc6ac 100644
--- a/submodules/TelegramUI/TelegramUI/SettingsController.swift
+++ b/submodules/TelegramUI/TelegramUI/SettingsController.swift
@@ -25,6 +25,7 @@ import LegacyUI
import PassportUI
import SearchUI
import ItemListPeerItem
+import CallListUI
private let maximumNumberOfAccounts = 3
diff --git a/submodules/TelegramUI/TelegramUI/SettingsSearchableItems.swift b/submodules/TelegramUI/TelegramUI/SettingsSearchableItems.swift
index 3da1a75330..6ce890f171 100644
--- a/submodules/TelegramUI/TelegramUI/SettingsSearchableItems.swift
+++ b/submodules/TelegramUI/TelegramUI/SettingsSearchableItems.swift
@@ -10,6 +10,7 @@ import OverlayStatusController
import AccountContext
import PassportUI
import LocalAuth
+import CallListUI
private let maximumNumberOfAccounts = 3
diff --git a/submodules/TelegramUI/TelegramUI/SharedAccountContext.swift b/submodules/TelegramUI/TelegramUI/SharedAccountContext.swift
index e371e7a3f0..074767f9f6 100644
--- a/submodules/TelegramUI/TelegramUI/SharedAccountContext.swift
+++ b/submodules/TelegramUI/TelegramUI/SharedAccountContext.swift
@@ -936,8 +936,8 @@ public final class SharedAccountContextImpl: SharedAccountContext {
handleTextLinkActionImpl(context: context, peerId: peerId, navigateDisposable: navigateDisposable, controller: controller, action: action, itemLink: itemLink)
}
- public func makePeerInfoController(context: AccountContext, peer: Peer) -> ViewController? {
- return peerInfoControllerImpl(context: context, peer: peer)
+ public func makePeerInfoController(context: AccountContext, peer: Peer, mode: PeerInfoControllerMode) -> ViewController? {
+ return peerInfoControllerImpl(context: context, peer: peer, mode: mode)
}
public func openExternalUrl(context: AccountContext, urlContext: OpenURLContext, url: String, forceExternal: Bool, presentationData: PresentationData, navigationController: NavigationController?, dismissInput: @escaping () -> Void) {
@@ -975,4 +975,8 @@ public final class SharedAccountContextImpl: SharedAccountContext {
public func presentContactsWarningSuppression(context: AccountContext, present: (ViewController, Any?) -> Void) {
presentContactsWarningSuppressionImpl(context: context, present: present)
}
+
+ public func makeContactSelectionController(_ params: ContactSelectionControllerParams) -> ContactSelectionController {
+ return ContactSelectionControllerImpl(params)
+ }
}
diff --git a/submodules/TelegramUI/TelegramUI/TelegramRootController.swift b/submodules/TelegramUI/TelegramUI/TelegramRootController.swift
index 76bb1deacf..66eea1b12d 100644
--- a/submodules/TelegramUI/TelegramUI/TelegramRootController.swift
+++ b/submodules/TelegramUI/TelegramUI/TelegramRootController.swift
@@ -8,6 +8,7 @@ import TelegramPresentationData
import TelegramUIPrivateModule
import AccountContext
import ContactListUI
+import CallListUI
public final class TelegramRootController: NavigationController {
private let context: AccountContext
diff --git a/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift b/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift
index 8a4061dcff..635c02d0e4 100644
--- a/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift
+++ b/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift
@@ -28,7 +28,7 @@ func handleTextLinkActionImpl(context: AccountContext, peerId: PeerId?, navigate
peerSignal = context.account.postbox.loadedPeerWithId(peerId) |> map(Optional.init)
navigateDisposable.set((peerSignal |> take(1) |> deliverOnMainQueue).start(next: { peer in
if let controller = controller, let peer = peer {
- if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer) {
+ if let infoController = context.sharedContext.makePeerInfoController(context: context, peer: peer, mode: .generic) {
(controller.navigationController as? NavigationController)?.pushViewController(infoController)
}
}
diff --git a/submodules/TelegramUI/TelegramUI/UserInfoController.swift b/submodules/TelegramUI/TelegramUI/UserInfoController.swift
index f90c0d4ce6..68d39a969d 100644
--- a/submodules/TelegramUI/TelegramUI/UserInfoController.swift
+++ b/submodules/TelegramUI/TelegramUI/UserInfoController.swift
@@ -565,7 +565,7 @@ private func stringForBlockAction(strings: PresentationStrings, action: Destruct
}
}
-private func userInfoEntries(account: Account, presentationData: PresentationData, view: PeerView, cachedPeerData: CachedPeerData?, deviceContacts: [(DeviceContactStableId, DeviceContactBasicData)], mode: UserInfoControllerMode, state: UserInfoState, peerChatState: PostboxCoding?, globalNotificationSettings: GlobalNotificationSettings) -> [UserInfoEntry] {
+private func userInfoEntries(account: Account, presentationData: PresentationData, view: PeerView, cachedPeerData: CachedPeerData?, deviceContacts: [(DeviceContactStableId, DeviceContactBasicData)], mode: PeerInfoControllerMode, state: UserInfoState, peerChatState: PostboxCoding?, globalNotificationSettings: GlobalNotificationSettings) -> [UserInfoEntry] {
var entries: [UserInfoEntry] = []
guard let peer = view.peers[view.peerId], let user = peerViewMainPeer(view) as? TelegramUser else {
@@ -762,12 +762,7 @@ private func getUserPeer(postbox: Postbox, peerId: PeerId) -> Signal<(Peer?, Cac
}
}
-public enum UserInfoControllerMode {
- case generic
- case calls(messages: [Message])
-}
-
-public func userInfoController(context: AccountContext, peerId: PeerId, mode: UserInfoControllerMode = .generic) -> ViewController {
+public func userInfoController(context: AccountContext, peerId: PeerId, mode: PeerInfoControllerMode = .generic) -> ViewController {
let statePromise = ValuePromise(UserInfoState(), ignoreRepeated: true)
let stateValue = Atomic(value: UserInfoState())
let updateState: ((UserInfoState) -> UserInfoState) -> Void = { f in
diff --git a/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj b/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj
index 1cb9d86f6f..9da046b6ac 100644
--- a/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj
+++ b/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj
@@ -214,12 +214,6 @@
D0185E8C208A025A005E1A6C /* ProxySettingsServerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0185E8B208A025A005E1A6C /* ProxySettingsServerItem.swift */; };
D018BE58218C7BD800C02DDC /* ChatMessageDeliveryFailedNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D018BE57218C7BD800C02DDC /* ChatMessageDeliveryFailedNode.swift */; };
D0192D44210A5AA50005FA10 /* DeviceContactDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0192D43210A5AA50005FA10 /* DeviceContactDataManager.swift */; };
- D01BAA181ECC8E0000295217 /* CallListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA171ECC8E0000295217 /* CallListController.swift */; };
- D01BAA1A1ECC8E0D00295217 /* CallListControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA191ECC8E0D00295217 /* CallListControllerNode.swift */; };
- D01BAA1C1ECC92F700295217 /* CallListViewTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA1B1ECC92F700295217 /* CallListViewTransition.swift */; };
- D01BAA1E1ECC931D00295217 /* CallListNodeEntries.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA1D1ECC931D00295217 /* CallListNodeEntries.swift */; };
- D01BAA201ECC9A2500295217 /* CallListNodeLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA1F1ECC9A2500295217 /* CallListNodeLocation.swift */; };
- D01BAA221ECE076100295217 /* CallListCallItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01BAA211ECE076100295217 /* CallListCallItem.swift */; };
D01C06AF1FBB461E001561AB /* JoinLinkPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01C06AE1FBB461E001561AB /* JoinLinkPreviewController.swift */; };
D01C06B11FBB4643001561AB /* JoinLinkPreviewControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01C06B01FBB4643001561AB /* JoinLinkPreviewControllerNode.swift */; };
D01C06B31FBB49A5001561AB /* JoinLinkPreviewPeerContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01C06B21FBB49A5001561AB /* JoinLinkPreviewPeerContentNode.swift */; };
@@ -510,6 +504,7 @@
D0C9C9BB2302168100FAB518 /* PeersNearbyIconNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C9BA2302168100FAB518 /* PeersNearbyIconNode.framework */; };
D0C9C9DE2302267200FAB518 /* SolidRoundedButtonNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C9DD2302267200FAB518 /* SolidRoundedButtonNode.framework */; };
D0C9CA192302297C00FAB518 /* PasscodeUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA182302297C00FAB518 /* PasscodeUI.framework */; };
+ D0C9CA8223022E3900FAB518 /* CallListUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9CA8123022E3900FAB518 /* CallListUI.framework */; };
D0CAD90120AEECAC00ACD96E /* ChatEditInterfaceMessageState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0CAD90020AEECAC00ACD96E /* ChatEditInterfaceMessageState.swift */; };
D0CB27CF20C17A4A001ACF93 /* TermsOfServiceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0CB27CE20C17A4A001ACF93 /* TermsOfServiceController.swift */; };
D0CB27D220C17A7F001ACF93 /* TermsOfServiceControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0CB27D120C17A7F001ACF93 /* TermsOfServiceControllerNode.swift */; };
@@ -1112,12 +1107,6 @@
D01AC91E1DD5E09000E8160F /* EditAccessoryPanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditAccessoryPanelNode.swift; sourceTree = ""; };
D01B279A1E39386C0022A4C0 /* SettingsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = ""; };
D01B279C1E394A500022A4C0 /* NotificationsAndSounds.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationsAndSounds.swift; sourceTree = ""; };
- D01BAA171ECC8E0000295217 /* CallListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListController.swift; sourceTree = ""; };
- D01BAA191ECC8E0D00295217 /* CallListControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListControllerNode.swift; sourceTree = ""; };
- D01BAA1B1ECC92F700295217 /* CallListViewTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListViewTransition.swift; sourceTree = ""; };
- D01BAA1D1ECC931D00295217 /* CallListNodeEntries.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListNodeEntries.swift; sourceTree = ""; };
- D01BAA1F1ECC9A2500295217 /* CallListNodeLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListNodeLocation.swift; sourceTree = ""; };
- D01BAA211ECE076100295217 /* CallListCallItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallListCallItem.swift; sourceTree = ""; };
D01C06AE1FBB461E001561AB /* JoinLinkPreviewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinLinkPreviewController.swift; sourceTree = ""; };
D01C06B01FBB4643001561AB /* JoinLinkPreviewControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinLinkPreviewControllerNode.swift; sourceTree = ""; };
D01C06B21FBB49A5001561AB /* JoinLinkPreviewPeerContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinLinkPreviewPeerContentNode.swift; sourceTree = ""; };
@@ -1553,6 +1542,7 @@
D0C9C9BA2302168100FAB518 /* PeersNearbyIconNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PeersNearbyIconNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C9DD2302267200FAB518 /* SolidRoundedButtonNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SolidRoundedButtonNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9CA182302297C00FAB518 /* PasscodeUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PasscodeUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D0C9CA8123022E3900FAB518 /* CallListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CallListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0CAD90020AEECAC00ACD96E /* ChatEditInterfaceMessageState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatEditInterfaceMessageState.swift; sourceTree = ""; };
D0CB27CE20C17A4A001ACF93 /* TermsOfServiceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TermsOfServiceController.swift; sourceTree = ""; };
D0CB27D120C17A7F001ACF93 /* TermsOfServiceControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TermsOfServiceControllerNode.swift; sourceTree = ""; };
@@ -1790,6 +1780,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D0C9CA8223022E3900FAB518 /* CallListUI.framework in Frameworks */,
D0C9CA192302297C00FAB518 /* PasscodeUI.framework in Frameworks */,
D0C9C9DE2302267200FAB518 /* SolidRoundedButtonNode.framework in Frameworks */,
D0C9C9BB2302168100FAB518 /* PeersNearbyIconNode.framework in Frameworks */,
@@ -2243,19 +2234,6 @@
name = "Item List";
sourceTree = "";
};
- D01BAA161ECC8DED00295217 /* Call List */ = {
- isa = PBXGroup;
- children = (
- D01BAA171ECC8E0000295217 /* CallListController.swift */,
- D01BAA191ECC8E0D00295217 /* CallListControllerNode.swift */,
- D01BAA1B1ECC92F700295217 /* CallListViewTransition.swift */,
- D01BAA1D1ECC931D00295217 /* CallListNodeEntries.swift */,
- D01BAA1F1ECC9A2500295217 /* CallListNodeLocation.swift */,
- D01BAA211ECE076100295217 /* CallListCallItem.swift */,
- );
- name = "Call List";
- sourceTree = "";
- };
D01C06AD1FBB45ED001561AB /* Join Link Preview */ = {
isa = PBXGroup;
children = (
@@ -2681,6 +2659,7 @@
D08D45281D5E340200A7428A /* Frameworks */ = {
isa = PBXGroup;
children = (
+ D0C9CA8123022E3900FAB518 /* CallListUI.framework */,
D0C9CA182302297C00FAB518 /* PasscodeUI.framework */,
D0C9C9DD2302267200FAB518 /* SolidRoundedButtonNode.framework */,
D0C9C9BA2302168100FAB518 /* PeersNearbyIconNode.framework */,
@@ -3493,7 +3472,6 @@
D0BC38681E3FB92B0044D6FE /* Compose */,
D0EE97131D88BB1A006C18E1 /* Peer Info */,
D0D2689B1D79D31500C422DA /* Peer Selection */,
- D01BAA161ECC8DED00295217 /* Call List */,
D0F69E791D6B8C3B0046BCD6 /* Settings */,
D0C50E361E93CAF200F62E39 /* Notifications */,
090E778422A9B94700CD99F5 /* Peers Nearby */,
@@ -4189,7 +4167,6 @@
D025402922E1F7F500AC0195 /* ChatTextInputSlowmodePlaceholderNode.swift in Sources */,
D0380DB8204EE0A5000414AB /* ChatInstantVideoMessageDurationNode.swift in Sources */,
D0EC6CDC1EB9F58800EBF1C3 /* TelegramAccountAuxiliaryMethods.swift in Sources */,
- D01BAA1A1ECC8E0D00295217 /* CallListControllerNode.swift in Sources */,
D0642EFC1F3E1E7B00792790 /* ChatHistoryNavigationButtons.swift in Sources */,
D03AA4E5202DF8840056C405 /* StickerPreviewPeekContent.swift in Sources */,
D025402322E1C92D00AC0195 /* ChatSlowmodeItem.swift in Sources */,
@@ -4199,7 +4176,6 @@
D02B198A21F1DA9E0094A764 /* SharedAccountContext.swift in Sources */,
D0F67FF21EE6B915000E5906 /* ChannelMembersSearchControllerNode.swift in Sources */,
D0E8B8BF20447A4600605593 /* SecretChatKeyControllerNode.swift in Sources */,
- D01BAA1E1ECC931D00295217 /* CallListNodeEntries.swift in Sources */,
D02B2B9820810DA00062476B /* StickerPaneSearchStickerItem.swift in Sources */,
D020A9DC1FEAE6E7008C66F7 /* OverlayPlayerControllerNode.swift in Sources */,
09D968A1221F7FF100B1458A /* ChatTypingActivityContentNode.swift in Sources */,
@@ -4271,7 +4247,6 @@
D007019E2029EFDD006B9E34 /* ICloudResources.swift in Sources */,
D0F760DD222034980074F7E5 /* ChannelStatsControllerNode.swift in Sources */,
D01590A622BD460C0017C33E /* MetalAnimationRenderer.swift in Sources */,
- D01BAA201ECC9A2500295217 /* CallListNodeLocation.swift in Sources */,
D0EC6D251EB9F58800EBF1C3 /* FetchCachedRepresentations.swift in Sources */,
D0EC6D261EB9F58800EBF1C3 /* TransformOutgoingMessageMedia.swift in Sources */,
D0EC6D271EB9F58800EBF1C3 /* FetchResource.swift in Sources */,
@@ -4308,7 +4283,6 @@
D0CE8CE51F6F354400AA2DB0 /* ChatTextInputAccessoryItem.swift in Sources */,
D097C26820DD0A1D007BB4B8 /* PeerReportController.swift in Sources */,
09F664C621EB400A00AB7E26 /* ThemeGridSearchContentNode.swift in Sources */,
- D01BAA181ECC8E0000295217 /* CallListController.swift in Sources */,
D0EC6D4B1EB9F58800EBF1C3 /* ChatListNode.swift in Sources */,
D0EC6D4D1EB9F58800EBF1C3 /* ChatListHoleItem.swift in Sources */,
0962E67921B67A9800245FD9 /* ChatMessageAnimatedStickerItemNode.swift in Sources */,
@@ -4445,7 +4419,6 @@
D0EC6D9C1EB9F58900EBF1C3 /* ChatMessageInstantVideoItemNode.swift in Sources */,
D0750C8222B2E4EE00BE5F6E /* SharedWakeupManager.swift in Sources */,
D0EC6D9D1EB9F58900EBF1C3 /* ChatMessageTextBubbleContentNode.swift in Sources */,
- D01BAA1C1ECC92F700295217 /* CallListViewTransition.swift in Sources */,
D00817DE22B47A14008A895F /* TGBridgeServer.m in Sources */,
D0FBE84F2273395C00B33B52 /* ChatListArchiveInfoItem.swift in Sources */,
09F664D021EBCFB900AB7E26 /* WallpaperCropNode.swift in Sources */,
@@ -4541,7 +4514,6 @@
D0EC6DD91EB9F58900EBF1C3 /* HorizontalListContextResultsChatInputContextPanelNode.swift in Sources */,
D0EC6DDA1EB9F58900EBF1C3 /* HorizontalListContextResultsChatInputPanelItem.swift in Sources */,
D0EC6DDB1EB9F58900EBF1C3 /* ChatInputPanelNode.swift in Sources */,
- D01BAA221ECE076100295217 /* CallListCallItem.swift in Sources */,
D0EC6DDC1EB9F58900EBF1C3 /* ChatTextInputPanelNode.swift in Sources */,
D06350AE2229A7F800FA2B32 /* InChatPrefetchManager.swift in Sources */,
D0EB41F51F30D26A00838FE6 /* LegacySuggestionContext.swift in Sources */,