diff --git a/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift b/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift index 8825973840..d56c1bcec0 100644 --- a/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift +++ b/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift @@ -86,7 +86,7 @@ private final class ArchivedStickersNoticeAlertContentNode: AlertContentNode { self.textNode = ASTextNode() self.textNode.maximumNumberOfLines = 4 - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = false self.actionNodesSeparator = ASDisplayNode() diff --git a/submodules/CallListUI/Sources/CallListControllerNode.swift b/submodules/CallListUI/Sources/CallListControllerNode.swift index 6c4805c495..b4b90095fa 100644 --- a/submodules/CallListUI/Sources/CallListControllerNode.swift +++ b/submodules/CallListUI/Sources/CallListControllerNode.swift @@ -256,7 +256,7 @@ final class CallListControllerNode: ASDisplayNode { self.statePromise = ValuePromise(self.currentState, ignoreRepeated: true) self.focusOnItemTag = focusOnItemTag - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift b/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift index d977ba902a..f11b5a043f 100644 --- a/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift +++ b/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift @@ -225,7 +225,7 @@ public final class ChatListSearchRecentPeersNode: ASDisplayNode { self.peerContextAction = peerContextAction self.isPeerSelected = isPeerSelected - self.listView = ListView() + self.listView = ListViewImpl() self.listView.preloadPages = false self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) self.listView.accessibilityPageScrolledString = { row, count in diff --git a/submodules/ChatListUI/Sources/ChatListControllerNode.swift b/submodules/ChatListUI/Sources/ChatListControllerNode.swift index ceee49ac25..a9bdacca0a 100644 --- a/submodules/ChatListUI/Sources/ChatListControllerNode.swift +++ b/submodules/ChatListUI/Sources/ChatListControllerNode.swift @@ -1173,7 +1173,7 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate { var cancelEditing: (() -> Void)? var dismissSearch: (() -> Void)? - let debugListView = ListView() + let debugListView = ListViewImpl() init(context: AccountContext, location: ChatListControllerLocation, previewing: Bool, controlsHistoryPreload: Bool, presentationData: PresentationData, animationCache: AnimationCache, animationRenderer: MultiAnimationRenderer, controller: ChatListControllerImpl) { self.context = context diff --git a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift index 988eb0aa81..7031f6ae98 100644 --- a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift +++ b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift @@ -1788,7 +1788,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode { self.selectedMessages = interaction.getSelectedMessageIds() self.selectedMessagesPromise.set(.single(self.selectedMessages)) - self.recentListNode = ListView() + self.recentListNode = ListViewImpl() self.recentListNode.preloadPages = false self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.recentListNode.accessibilityPageScrolledString = { row, count in @@ -1799,7 +1799,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode { self.shimmerNode.isUserInteractionEnabled = false self.shimmerNode.allowsGroupOpacity = true - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode?.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.listNode?.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/ChatListUI/Sources/Node/ChatListNode.swift b/submodules/ChatListUI/Sources/Node/ChatListNode.swift index 9e3e71739d..63e0e3937f 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListNode.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListNode.swift @@ -1121,7 +1121,7 @@ public enum ChatListNodeEmptyState: Equatable { case empty(isLoading: Bool, hasArchiveInfo: Bool) } -public final class ChatListNode: ListView { +public final class ChatListNode: ListViewImpl { public enum OpenStoriesSubject { case peer(EnginePeer.Id) case archive diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift index beb6050497..3c6ce36fbb 100644 --- a/submodules/ContactListUI/Sources/ContactListNode.swift +++ b/submodules/ContactListUI/Sources/ContactListNode.swift @@ -1233,7 +1233,7 @@ public final class ContactListNode: ASDisplayNode { let presentationData = updatedPresentationData?.initial ?? context.sharedContext.currentPresentationData.with { $0 } self.presentationData = presentationData - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift b/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift index c033bca502..01e8689d63 100644 --- a/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift +++ b/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift @@ -299,7 +299,7 @@ public final class ContactsSearchContainerNode: SearchDisplayControllerContentNo self.backgroundNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor self.backgroundNode.alpha = 0.0 - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor self.listNode.alpha = 0.0 diff --git a/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift b/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift index c75a190a30..7e5a8943f1 100644 --- a/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift +++ b/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift @@ -290,7 +290,7 @@ final class InviteContactsControllerNode: ASDisplayNode { self.presentationDataPromise = Promise(self.presentationData) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/Display/Source/ListView.swift b/submodules/Display/Source/ListView.swift index 40dadd5d0f..0a78640967 100644 --- a/submodules/Display/Source/ListView.swift +++ b/submodules/Display/Source/ListView.swift @@ -38,7 +38,7 @@ private final class ListViewBackingLayer: CALayer { } public final class ListViewBackingView: UIView { - public fileprivate(set) weak var target: ListView? + public fileprivate(set) weak var target: ListViewImpl? override public class var layerClass: AnyClass { return ListViewBackingLayer.self @@ -154,7 +154,7 @@ private func cancelContextGestures(view: UIView) { } } -open class ListView: ASDisplayNode, ASScrollViewDelegate, ASGestureRecognizerDelegate { +open class ListViewImpl: ASDisplayNode, ListView, ASScrollViewDelegate, ASGestureRecognizerDelegate { public struct ScrollingIndicatorState { public struct Item { public var index: Int @@ -470,8 +470,8 @@ open class ListView: ASDisplayNode, ASScrollViewDelegate, ASGestureRecognizerDel override public init() { class DisplayLinkProxy: NSObject { - weak var target: ListView? - init(target: ListView) { + weak var target: ListViewImpl? + init(target: ListViewImpl) { self.target = target } diff --git a/submodules/Display/Source/ListViewProtocol.swift b/submodules/Display/Source/ListViewProtocol.swift new file mode 100644 index 0000000000..f66a3f85e6 --- /dev/null +++ b/submodules/Display/Source/ListViewProtocol.swift @@ -0,0 +1,167 @@ +import UIKit +import AsyncDisplayKit +import SwiftSignalKit + +public protocol ListView: ASDisplayNode { + // MARK: - Configuration Properties (get/set) + var scroller: ListViewScroller { get } + var scrollEnabled: Bool { get set } + var preloadPages: Bool { get set } + var rotated: Bool { get set } + var experimentalSnapScrollToItem: Bool { get set } + var useMainQueueTransactions: Bool { get set } + var keepMinimalScrollHeightWithTopInset: CGFloat? { get set } + var itemNodeHitTest: ((CGPoint) -> Bool)? { get set } + var stackFromBottom: Bool { get set } + var stackFromBottomInsetItemFactor: CGFloat { get set } + var limitHitTestToNodes: Bool { get set } + var keepTopItemOverscrollBackground: ListViewKeepTopItemOverscrollBackground? { get set } + var keepBottomItemOverscrollBackground: UIColor? { get set } + var snapToBottomInsetUntilFirstInteraction: Bool { get set } + var allowInsetFixWhileTracking: Bool { get set } + var visualInsets: UIEdgeInsets? { get set } + var dynamicVisualInsets: (() -> UIEdgeInsets)? { get set } + var verticalScrollIndicatorColor: UIColor? { get set } + var verticalScrollIndicatorFollowsOverscroll: Bool { get set } + var globalIgnoreScrollingEvents: Bool { get set } + var ignoreStopScrolling: Bool { get set } + var synchronousNodes: Bool { get set } + var debugInfo: Bool { get set } + var useSingleDimensionTouchPoint: Bool { get set } + var defaultToSynchronousTransactionWhileScrolling: Bool { get set } + var enableExtractedBackgrounds: Bool { get set } + var itemHeaderNodesAlpha: CGFloat { get set } + var autoScrollWhenReordering: Bool { get set } + var reorderedItemHasShadow: Bool { get set } + var reorderingRequiresLongPress: Bool { get set } + var tempTopInset: CGFloat { get set } + var accessibilityPageScrolledString: ((String, String) -> String)? { get set } + + // MARK: - Read-only State Properties + var visibleSize: CGSize { get } + var insets: UIEdgeInsets { get } + var headerInsets: UIEdgeInsets { get } + var scrollIndicatorInsets: UIEdgeInsets { get } + var isTracking: Bool { get } + var trackingOffset: CGFloat { get } + var beganTrackingAtTopOrigin: Bool { get } + var isDragging: Bool { get } + var isDeceleratingAfterTracking: Bool { get } + var isReordering: Bool { get } + var edgeEffectExtension: CGFloat { get } + var displayedItemRange: ListViewDisplayedItemRange { get } + var internalDisplayedItemRange: ListViewDisplayedItemRange? { get } + var opaqueTransactionState: Any? { get } + + // MARK: - Callbacks + var displayedItemRangeChanged: (ListViewDisplayedItemRange, Any?) -> Void { get set } + var visibleContentOffsetChanged: (ListViewVisibleContentOffset, ContainedViewLayoutTransition) -> Void { get set } + var visibleBottomContentOffsetChanged: (ListViewVisibleContentOffset) -> Void { get set } + var beganInteractiveDragging: (CGPoint) -> Void { get set } + var endedInteractiveDragging: (CGPoint) -> Void { get set } + var didEndScrolling: ((Bool) -> Void)? { get set } + var didEndScrollingWithOverscroll: (() -> Void)? { get set } + var generalScrollDirectionUpdated: (GeneralScrollDirection) -> Void { get set } + var updateFloatingHeaderOffset: ((CGFloat, ContainedViewLayoutTransition) -> Void)? { get set } + var didScrollWithOffset: ((CGFloat, ContainedViewLayoutTransition, ListViewItemNode?, Bool) -> Void)? { get set } + var addContentOffset: ((CGFloat, ListViewItemNode?) -> Void)? { get set } + var shouldStopScrolling: ((CGFloat) -> Bool)? { get set } + var onContentsUpdated: ((ContainedViewLayoutTransition) -> Void)? { get set } + var onEdgeEffectExtensionUpdated: ((ContainedViewLayoutTransition) -> Void)? { get set } + var updateScrollingIndicator: ((ListViewImpl.ScrollingIndicatorState?, ContainedViewLayoutTransition) -> Void)? { get set } + var tapped: (() -> Void)? { get set } + var willBeginReorder: (CGPoint) -> Void { get set } + var reorderBegan: () -> Void { get set } + var reorderItem: (Int, Int, Any?) -> Signal { get set } + var reorderCompleted: (Any?) -> Void { get set } + + // MARK: - Methods + func transaction( + deleteIndices: [ListViewDeleteItem], + insertIndicesAndItems: [ListViewInsertItem], + updateIndicesAndItems: [ListViewUpdateItem], + options: ListViewDeleteAndInsertOptions, + scrollToItem: ListViewScrollToItem?, + additionalScrollDistance: CGFloat, + updateSizeAndInsets: ListViewUpdateSizeAndInsets?, + stationaryItemRange: (Int, Int)?, + updateOpaqueState: Any?, + completion: @escaping (ListViewDisplayedItemRange) -> Void + ) + + func addAfterTransactionsCompleted(_ f: @escaping () -> Void) + func visibleContentOffset() -> ListViewVisibleContentOffset + func visibleBottomContentOffset() -> ListViewVisibleContentOffset + func stopScrolling() + func cancelTracking() + @discardableResult func scrollToOffsetFromTop(_ offset: CGFloat, animated: Bool) -> Bool + @discardableResult func scrollWithDirection(_ direction: ListViewScrollDirection, distance: CGFloat) -> Bool + func transferVelocity(_ velocity: CGFloat) + func resetScrolledToItem() + + func itemIndexAtPoint(_ point: CGPoint) -> Int? + func itemNodeAtIndex(_ index: Int) -> ListViewItemNode? + func indexOf(itemNode: ListViewItemNode) -> Int? + func forEachItemNode(_ f: (ASDisplayNode) -> Void) + func forEachRemovedItemNode(_ f: (ASDisplayNode) -> Void) + func forEachVisibleItemNode(_ f: (ASDisplayNode) -> Void) + func enumerateItemNodes(_ f: (ASDisplayNode) -> Bool) + func forEachItemHeaderNode(_ f: (ListViewItemHeaderNode) -> Void) + func forEachAccessoryItemNode(_ f: (ListViewAccessoryItemNode) -> Void) + + func ensureItemNodeVisible(_ node: ListViewItemNode, animated: Bool, overflow: CGFloat, allowIntersection: Bool, atTop: Bool, curve: ListViewAnimationCurve) + func ensureItemNodeVisibleAtTopInset(_ node: ListViewItemNode) + func itemNodeRelativeOffset(_ node: ListViewItemNode) -> CGFloat? + func itemNodeVisibleInsideInsets(_ node: ListViewItemNode) -> Bool + + func clearHighlightAnimated(_ animated: Bool) + func updateNodeHighlightsAnimated(_ animated: Bool) + func cancelSelection() + func updateVisibleItemRange(force: Bool) + func flashHeaderItems(duration: Double) + func withTransaction(_ f: @escaping () -> Void) + + func customItemDeleteAnimationDuration(itemNode: ListViewItemNode) -> Double? +} + +// MARK: - Default Parameter Values +// Swift protocols cannot have default parameter values, so we provide them via extensions. +public extension ListView { + func transaction( + deleteIndices: [ListViewDeleteItem], + insertIndicesAndItems: [ListViewInsertItem], + updateIndicesAndItems: [ListViewUpdateItem], + options: ListViewDeleteAndInsertOptions, + scrollToItem: ListViewScrollToItem? = nil, + additionalScrollDistance: CGFloat = 0.0, + updateSizeAndInsets: ListViewUpdateSizeAndInsets? = nil, + stationaryItemRange: (Int, Int)? = nil, + updateOpaqueState: Any?, + completion: @escaping (ListViewDisplayedItemRange) -> Void = { _ in } + ) { + self.transaction( + deleteIndices: deleteIndices, + insertIndicesAndItems: insertIndicesAndItems, + updateIndicesAndItems: updateIndicesAndItems, + options: options, + scrollToItem: scrollToItem, + additionalScrollDistance: additionalScrollDistance, + updateSizeAndInsets: updateSizeAndInsets, + stationaryItemRange: stationaryItemRange, + updateOpaqueState: updateOpaqueState, + completion: completion + ) + } + + func updateVisibleItemRange() { + self.updateVisibleItemRange(force: false) + } + + func flashHeaderItems() { + self.flashHeaderItems(duration: 2.0) + } + + func ensureItemNodeVisible(_ node: ListViewItemNode, animated: Bool = true, overflow: CGFloat = 0.0, allowIntersection: Bool = false, atTop: Bool = false, curve: ListViewAnimationCurve = .Default(duration: 0.25)) { + self.ensureItemNodeVisible(node, animated: animated, overflow: overflow, allowIntersection: allowIntersection, atTop: atTop, curve: curve) + } +} diff --git a/submodules/HashtagSearchUI/Sources/HashtagSearchRecentListNode.swift b/submodules/HashtagSearchUI/Sources/HashtagSearchRecentListNode.swift index d2d29fda92..4e395aaf5a 100644 --- a/submodules/HashtagSearchUI/Sources/HashtagSearchRecentListNode.swift +++ b/submodules/HashtagSearchUI/Sources/HashtagSearchRecentListNode.swift @@ -385,7 +385,7 @@ final class HashtagSearchRecentListNode: ASDisplayNode { let presentationData = context.sharedContext.currentPresentationData.with { $0 } self.presentationData = presentationData - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift index e3f95ed8cf..f1776d198d 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift @@ -362,7 +362,7 @@ public final class InviteLinkInviteController: ViewController { self.historyBackgroundNode.addSubnode(self.historyBackgroundContentNode) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3) self.listNode.verticalScrollIndicatorFollowsOverscroll = true self.listNode.accessibilityPageScrolledString = { row, count in diff --git a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift index f226e9fd49..41a6025c11 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift @@ -567,7 +567,7 @@ public final class InviteLinkViewController: ViewController { self.historyBackgroundNode.addSubnode(self.historyBackgroundContentNode) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3) self.listNode.verticalScrollIndicatorFollowsOverscroll = true self.listNode.accessibilityPageScrolledString = { row, count in diff --git a/submodules/InviteLinksUI/Sources/InviteRequestsSearchItem.swift b/submodules/InviteLinksUI/Sources/InviteRequestsSearchItem.swift index 2a2b6f247e..a75cdc14d3 100644 --- a/submodules/InviteLinksUI/Sources/InviteRequestsSearchItem.swift +++ b/submodules/InviteLinksUI/Sources/InviteRequestsSearchItem.swift @@ -364,7 +364,7 @@ public final class InviteRequestsSearchContainerNode: SearchDisplayControllerCon self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = UIColor.black.withAlphaComponent(0.5) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/ItemListUI/Sources/ItemListControllerNode.swift b/submodules/ItemListUI/Sources/ItemListControllerNode.swift index 52e9e7633d..76901d6706 100644 --- a/submodules/ItemListUI/Sources/ItemListControllerNode.swift +++ b/submodules/ItemListUI/Sources/ItemListControllerNode.swift @@ -310,7 +310,7 @@ open class ItemListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate { self.navigationBar = navigationBar self.listNodeContainer = ASDisplayNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.leftOverlayNode = ASDisplayNode() self.leftOverlayNode.isUserInteractionEnabled = false self.rightOverlayNode = ASDisplayNode() diff --git a/submodules/LocationUI/Sources/LocationPickerControllerNode.swift b/submodules/LocationUI/Sources/LocationPickerControllerNode.swift index 1cab3b1644..5717a31311 100644 --- a/submodules/LocationUI/Sources/LocationPickerControllerNode.swift +++ b/submodules/LocationUI/Sources/LocationPickerControllerNode.swift @@ -399,7 +399,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM self.state = LocationPickerState() self.statePromise = Promise(self.state) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3) self.listNode.verticalScrollIndicatorFollowsOverscroll = true diff --git a/submodules/LocationUI/Sources/LocationSearchContainerNode.swift b/submodules/LocationUI/Sources/LocationSearchContainerNode.swift index aef7f092ae..eb47572aec 100644 --- a/submodules/LocationUI/Sources/LocationSearchContainerNode.swift +++ b/submodules/LocationUI/Sources/LocationSearchContainerNode.swift @@ -138,7 +138,7 @@ final class LocationSearchContainerNode: ASDisplayNode { self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = .clear // UIColor.black.withAlphaComponent(0.5) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor self.listNode.alpha = 0.0 self.listNode.accessibilityPageScrolledString = { row, count in diff --git a/submodules/LocationUI/Sources/LocationViewControllerNode.swift b/submodules/LocationUI/Sources/LocationViewControllerNode.swift index 7b1baca60b..5eef4f69b7 100644 --- a/submodules/LocationUI/Sources/LocationViewControllerNode.swift +++ b/submodules/LocationUI/Sources/LocationViewControllerNode.swift @@ -309,7 +309,7 @@ final class LocationViewControllerNode: ViewControllerTracingNode, CLLocationMan self.state = LocationViewState() self.statePromise = Promise(self.state) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3) self.listNode.verticalScrollIndicatorFollowsOverscroll = true diff --git a/submodules/MediaPickerUI/Sources/MediaGroupsAlbumGridItem.swift b/submodules/MediaPickerUI/Sources/MediaGroupsAlbumGridItem.swift index dfeba38478..792d1109f0 100644 --- a/submodules/MediaPickerUI/Sources/MediaGroupsAlbumGridItem.swift +++ b/submodules/MediaPickerUI/Sources/MediaGroupsAlbumGridItem.swift @@ -280,7 +280,7 @@ private class MediaGroupsAlbumGridItemNode: ListViewItemNode { private var enqueuedTransitions: [MediaGroupsAlbumGridItemNodeTransition] = [] init() { - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init(layerBacked: false, rotated: false, seeThrough: false) diff --git a/submodules/MediaPickerUI/Sources/MediaGroupsScreen.swift b/submodules/MediaPickerUI/Sources/MediaGroupsScreen.swift index 105c57fbef..ebb74d6763 100644 --- a/submodules/MediaPickerUI/Sources/MediaGroupsScreen.swift +++ b/submodules/MediaPickerUI/Sources/MediaGroupsScreen.swift @@ -208,7 +208,7 @@ public final class MediaGroupsScreen: ViewController, AttachmentContainable { self.containerNode = ASDisplayNode() self.backgroundNode = NavigationBackgroundNode(color: self.presentationData.theme.rootController.tabBar.backgroundColor) - self.listNode = ListView() + self.listNode = ListViewImpl() super.init() diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift index c661eab9f0..151237435e 100644 --- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift +++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift @@ -128,7 +128,7 @@ final class ChannelDiscussionGroupSearchContainerNode: SearchDisplayControllerCo self.presentationDataPromise = Promise(self.presentationData) self.dimNode = ASDisplayNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift b/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift index c8ca63b995..13fd8cad95 100644 --- a/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift +++ b/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift @@ -367,12 +367,12 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon } self.presentationDataPromise = Promise(self.presentationData) - self.emptyQueryListNode = ListView() + self.emptyQueryListNode = ListViewImpl() self.emptyQueryListNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift b/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift index 18b0ea2db7..2925bbd07f 100644 --- a/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift +++ b/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift @@ -207,7 +207,7 @@ class ChannelMembersSearchControllerNode: ASDisplayNode { init(context: AccountContext, presentationData: PresentationData, forceTheme: PresentationTheme?, peerId: EnginePeer.Id, mode: ChannelMembersSearchControllerMode, filters: [ChannelMembersSearchFilter]) { self.context = context - self.listNode = ListView() + self.listNode = ListViewImpl() self.peerId = peerId self.mode = mode self.filters = filters diff --git a/submodules/SettingsUI/Sources/DeleteAccountPeersItem.swift b/submodules/SettingsUI/Sources/DeleteAccountPeersItem.swift index 1ce362fcd1..7ccbca5f40 100644 --- a/submodules/SettingsUI/Sources/DeleteAccountPeersItem.swift +++ b/submodules/SettingsUI/Sources/DeleteAccountPeersItem.swift @@ -166,7 +166,7 @@ class DeleteAccountPeersItemNode: ListViewItemNode, ItemListItemNode { self.maskNode = ASImageNode() self.maskNode.isUserInteractionEnabled = false - self.listView = ListView() + self.listView = ListViewImpl() self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init(layerBacked: false) diff --git a/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift b/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift index 6fbc28259b..d92950f226 100644 --- a/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift +++ b/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift @@ -167,7 +167,7 @@ private final class LocalizationListSearchContainerNode: SearchDisplayController self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = .clear - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } @@ -379,7 +379,7 @@ final class LocalizationListControllerNode: ViewControllerTracingNode { self.push = push self.focusOnItemTag = focusOnItemTag - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.list.blocksBackgroundColor, direction: true) self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift index 32ca8fcbdd..4caf2e68c7 100644 --- a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift +++ b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift @@ -491,7 +491,7 @@ final class NotificationExceptionsControllerNode: ViewControllerTracingNode { self.present = present self.pushController = pushController self.stateValue = Atomic(value: NotificationExceptionState(mode: mode)) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.chatList.backgroundColor, direction: true) self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string @@ -985,7 +985,7 @@ private final class NotificationExceptionsSearchContainerNode: SearchDisplayCont self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = .clear - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift b/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift index ce0598ba31..440f524fd2 100644 --- a/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift +++ b/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift @@ -285,14 +285,14 @@ public final class SettingsSearchContainerNode: SearchDisplayControllerContentNo self.presentationData = presentationData self.presentationDataPromise = Promise(self.presentationData) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor self.listNode.isHidden = true self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } - self.recentListNode = ListView() + self.recentListNode = ListViewImpl() self.recentListNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.recentListNode.accessibilityPageScrolledString = { row, count in diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift index 7d673f3531..fad4ad8e12 100644 --- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift +++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift @@ -731,7 +731,7 @@ class ThemeSettingsAccentColorItemNode: ListViewItemNode, ItemListItemNode { self.maskNode = ASImageNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init(layerBacked: false) diff --git a/submodules/SparseItemGrid/Sources/SparseDiscreteScrollingArea.swift b/submodules/SparseItemGrid/Sources/SparseDiscreteScrollingArea.swift index 772edacaff..311fdf4d1d 100644 --- a/submodules/SparseItemGrid/Sources/SparseDiscreteScrollingArea.swift +++ b/submodules/SparseItemGrid/Sources/SparseDiscreteScrollingArea.swift @@ -125,7 +125,7 @@ public final class SparseDiscreteScrollingArea: ASDisplayNode { private struct State { var containerSize: CGSize var containerInsets: UIEdgeInsets - var scrollingState: ListView.ScrollingIndicatorState? + var scrollingState: ListViewImpl.ScrollingIndicatorState? var isScrolling: Bool var isDragging: Bool var theme: PresentationTheme @@ -288,7 +288,7 @@ public final class SparseDiscreteScrollingArea: ASDisplayNode { public func update( containerSize: CGSize, containerInsets: UIEdgeInsets, - scrollingState: ListView.ScrollingIndicatorState?, + scrollingState: ListViewImpl.ScrollingIndicatorState?, isScrolling: Bool, theme: PresentationTheme, transition: ContainedViewLayoutTransition diff --git a/submodules/TelegramUI/Components/AsyncListComponent/Sources/AsyncListComponent.swift b/submodules/TelegramUI/Components/AsyncListComponent/Sources/AsyncListComponent.swift index 1a537db8de..cd85867620 100644 --- a/submodules/TelegramUI/Components/AsyncListComponent/Sources/AsyncListComponent.swift +++ b/submodules/TelegramUI/Components/AsyncListComponent/Sources/AsyncListComponent.swift @@ -465,7 +465,7 @@ public final class AsyncListComponent: Component { private var ignoreUpdateVisibleItems: Bool = false public override init(frame: CGRect) { - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.useMainQueueTransactions = true self.listNode.scroller.delaysContentTouches = false self.listNode.reorderedItemHasShadow = false diff --git a/submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileSearchItem.swift b/submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileSearchItem.swift index d1b6135765..cf18f0c2a8 100644 --- a/submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileSearchItem.swift +++ b/submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileSearchItem.swift @@ -317,7 +317,7 @@ public final class AttachmentFileSearchContainerNode: SearchDisplayControllerCon self.backgroundNode = ASDisplayNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/Chat/ChatHistorySearchContainerNode/Sources/ChatHistorySearchContainerNode.swift b/submodules/TelegramUI/Components/Chat/ChatHistorySearchContainerNode/Sources/ChatHistorySearchContainerNode.swift index 417e776dda..2f272d51d0 100644 --- a/submodules/TelegramUI/Components/Chat/ChatHistorySearchContainerNode/Sources/ChatHistorySearchContainerNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatHistorySearchContainerNode/Sources/ChatHistorySearchContainerNode.swift @@ -159,7 +159,7 @@ public final class ChatHistorySearchContainerNode: SearchDisplayControllerConten self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = .clear - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/Chat/ChatInlineSearchResultsListComponent/Sources/ChatInlineSearchResultsListComponent.swift b/submodules/TelegramUI/Components/Chat/ChatInlineSearchResultsListComponent/Sources/ChatInlineSearchResultsListComponent.swift index c84ec35a84..cf160abb9f 100644 --- a/submodules/TelegramUI/Components/Chat/ChatInlineSearchResultsListComponent/Sources/ChatInlineSearchResultsListComponent.swift +++ b/submodules/TelegramUI/Components/Chat/ChatInlineSearchResultsListComponent/Sources/ChatInlineSearchResultsListComponent.swift @@ -281,7 +281,7 @@ public final class ChatInlineSearchResultsListComponent: Component { private var hintAnimateListTransition: Bool = false override public init(frame: CGRect) { - self.listNode = ListView() + self.listNode = ListViewImpl() super.init(frame: frame) diff --git a/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift b/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift index 88f49088f4..f09dfe4ae6 100644 --- a/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift +++ b/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift @@ -883,7 +883,7 @@ private class ChatQrCodeScreenNode: ViewControllerTracingNode, ASScrollViewDeleg self.scanButton.title = presentationData.strings.PeerInfo_QRCode_Scan self.scanButton.icon = UIImage(bundleImageName: "Settings/ScanQr") - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init() diff --git a/submodules/TelegramUI/Components/Chat/ChatRecentActionsController/Sources/ChatRecentActionsControllerNode.swift b/submodules/TelegramUI/Components/Chat/ChatRecentActionsController/Sources/ChatRecentActionsControllerNode.swift index 8ac6cb0dfc..ae38d3783b 100644 --- a/submodules/TelegramUI/Components/Chat/ChatRecentActionsController/Sources/ChatRecentActionsControllerNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatRecentActionsController/Sources/ChatRecentActionsControllerNode.swift @@ -129,7 +129,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode { self.panelButtonNode.setTitle(self.presentationData.strings.Channel_AdminLog_Settings, with: Font.regular(17.0), with: self.presentationData.theme.chat.inputPanel.panelControlAccentColor, for: []) self.panelInfoButtonNode = HighlightableButtonNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(CGFloat(Double.pi), 0.0, 0.0, 1.0) self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/TelegramUI/Components/ChatThemeScreen/Sources/ChatThemeScreen.swift b/submodules/TelegramUI/Components/ChatThemeScreen/Sources/ChatThemeScreen.swift index 9eb26fb647..d33e7e4012 100644 --- a/submodules/TelegramUI/Components/ChatThemeScreen/Sources/ChatThemeScreen.swift +++ b/submodules/TelegramUI/Components/ChatThemeScreen/Sources/ChatThemeScreen.swift @@ -930,7 +930,7 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega self.otherButton = HighlightableButtonNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init() diff --git a/submodules/TelegramUI/Components/GroupStickerPackSetupController/Sources/GroupStickerSearchContainerNode.swift b/submodules/TelegramUI/Components/GroupStickerPackSetupController/Sources/GroupStickerSearchContainerNode.swift index 29f9b0d3c6..e8224ba5ca 100644 --- a/submodules/TelegramUI/Components/GroupStickerPackSetupController/Sources/GroupStickerSearchContainerNode.swift +++ b/submodules/TelegramUI/Components/GroupStickerPackSetupController/Sources/GroupStickerSearchContainerNode.swift @@ -118,7 +118,7 @@ public final class GroupStickerSearchContainerNode: SearchDisplayControllerConte } self.presentationDataPromise = Promise(self.presentationData) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/MiniAppListScreen/Sources/MiniAppListScreen.swift b/submodules/TelegramUI/Components/MiniAppListScreen/Sources/MiniAppListScreen.swift index 4216255eed..7e7f049436 100644 --- a/submodules/TelegramUI/Components/MiniAppListScreen/Sources/MiniAppListScreen.swift +++ b/submodules/TelegramUI/Components/MiniAppListScreen/Sources/MiniAppListScreen.swift @@ -113,7 +113,7 @@ final class MiniAppListScreenComponent: Component { } } - private final class ContentListNode: ListView { + private final class ContentListNode: ListViewImpl { weak var parentView: View? let context: AccountContext var presentationData: PresentationData diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoGroupsInCommonPaneNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoGroupsInCommonPaneNode.swift index bc83ff6839..1f69cbc65a 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoGroupsInCommonPaneNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoGroupsInCommonPaneNode.swift @@ -110,7 +110,7 @@ final class PeerInfoGroupsInCommonPaneNode: ASDisplayNode, PeerInfoPaneNode { self.groupsInCommonContext = groupsInCommonContext let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoMembersPane.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoMembersPane.swift index 10e3ff045f..284992c656 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoMembersPane.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoMembersPane.swift @@ -320,7 +320,7 @@ final class PeerInfoMembersPaneNode: ASDisplayNode, PeerInfoPaneNode { self.action = action let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoRecommendedPeersPane.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoRecommendedPeersPane.swift index 4db8557ff1..31e13a2fd3 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoRecommendedPeersPane.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/Panes/PeerInfoRecommendedPeersPane.swift @@ -158,7 +158,7 @@ final class PeerInfoRecommendedPeersPaneNode: ASDisplayNode, PeerInfoPaneNode { self.openPeerContextAction = openPeerContextAction let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/PeerManagement/OldChannelsController/Sources/OldChannelsSearch.swift b/submodules/TelegramUI/Components/PeerManagement/OldChannelsController/Sources/OldChannelsSearch.swift index 9f563290ee..8259a5ab74 100644 --- a/submodules/TelegramUI/Components/PeerManagement/OldChannelsController/Sources/OldChannelsSearch.swift +++ b/submodules/TelegramUI/Components/PeerManagement/OldChannelsController/Sources/OldChannelsSearch.swift @@ -198,7 +198,7 @@ private final class OldChannelsSearchContainerNode: SearchDisplayControllerConte self.presentationData = presentationData self.presentationDataPromise = Promise(self.presentationData) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor self.listNode.isHidden = true self.listNode.accessibilityPageScrolledString = { row, count in diff --git a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/QuickReplySetupScreen.swift b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/QuickReplySetupScreen.swift index ea2f1620ee..95b256ae73 100644 --- a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/QuickReplySetupScreen.swift +++ b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/QuickReplySetupScreen.swift @@ -301,7 +301,7 @@ final class QuickReplySetupScreenComponent: Component { } } - private final class ContentListNode: ListView { + private final class ContentListNode: ListViewImpl { weak var parentView: View? let context: AccountContext var presentationData: PresentationData diff --git a/submodules/TelegramUI/Components/Settings/LanguageSelectionScreen/Sources/LanguageSelectionScreenNode.swift b/submodules/TelegramUI/Components/Settings/LanguageSelectionScreen/Sources/LanguageSelectionScreenNode.swift index 357421eff3..13761c553c 100644 --- a/submodules/TelegramUI/Components/Settings/LanguageSelectionScreen/Sources/LanguageSelectionScreenNode.swift +++ b/submodules/TelegramUI/Components/Settings/LanguageSelectionScreen/Sources/LanguageSelectionScreenNode.swift @@ -115,7 +115,7 @@ private final class LocalizationListSearchContainerNode: SearchDisplayController self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = UIColor.black.withAlphaComponent(0.5) - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } @@ -329,7 +329,7 @@ final class LanguageSelectionScreenNode: ViewControllerTracingNode { self.push = push self.selectLocalization = selectLocalization - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.list.blocksBackgroundColor, direction: true) self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/TelegramUI/Components/Settings/PeerSelectionScreen/Sources/PeerSelectionScreen.swift b/submodules/TelegramUI/Components/Settings/PeerSelectionScreen/Sources/PeerSelectionScreen.swift index f62491bf65..0cb04d686f 100644 --- a/submodules/TelegramUI/Components/Settings/PeerSelectionScreen/Sources/PeerSelectionScreen.swift +++ b/submodules/TelegramUI/Components/Settings/PeerSelectionScreen/Sources/PeerSelectionScreen.swift @@ -142,7 +142,7 @@ final class PeerSelectionScreenComponent: Component { } } - private final class ContentListNode: ListView { + private final class ContentListNode: ListViewImpl { weak var parentView: View? let context: AccountContext var presentationData: PresentationData diff --git a/submodules/TelegramUI/Components/Settings/ThemeCarouselItem/Sources/ThemeCarouselItem.swift b/submodules/TelegramUI/Components/Settings/ThemeCarouselItem/Sources/ThemeCarouselItem.swift index 7f8a58041d..c3fda9e89b 100644 --- a/submodules/TelegramUI/Components/Settings/ThemeCarouselItem/Sources/ThemeCarouselItem.swift +++ b/submodules/TelegramUI/Components/Settings/ThemeCarouselItem/Sources/ThemeCarouselItem.swift @@ -722,7 +722,7 @@ public class ThemeCarouselThemeItemNode: ListViewItemNode, ItemListItemNode { self.maskNode = ASImageNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init(layerBacked: false) diff --git a/submodules/TelegramUI/Components/Settings/ThemeSettingsThemeItem/Sources/ThemeSettingsThemeItem.swift b/submodules/TelegramUI/Components/Settings/ThemeSettingsThemeItem/Sources/ThemeSettingsThemeItem.swift index 4108dd4274..4b8a806e25 100644 --- a/submodules/TelegramUI/Components/Settings/ThemeSettingsThemeItem/Sources/ThemeSettingsThemeItem.swift +++ b/submodules/TelegramUI/Components/Settings/ThemeSettingsThemeItem/Sources/ThemeSettingsThemeItem.swift @@ -546,7 +546,7 @@ public class ThemeSettingsThemeItemNode: ListViewItemNode, ItemListItemNode { self.maskNode = ASImageNode() - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) super.init(layerBacked: false) diff --git a/submodules/TelegramUI/Components/Settings/TimezoneSelectionScreen/Sources/TimezoneSelectionScreenNode.swift b/submodules/TelegramUI/Components/Settings/TimezoneSelectionScreen/Sources/TimezoneSelectionScreenNode.swift index 7db2097550..f67d1f3b13 100644 --- a/submodules/TelegramUI/Components/Settings/TimezoneSelectionScreen/Sources/TimezoneSelectionScreenNode.swift +++ b/submodules/TelegramUI/Components/Settings/TimezoneSelectionScreen/Sources/TimezoneSelectionScreenNode.swift @@ -111,7 +111,7 @@ private final class TimezoneListSearchContainerNode: SearchDisplayControllerCont self.dimNode = ASDisplayNode() self.dimNode.backgroundColor = .clear - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } @@ -392,7 +392,7 @@ final class TimezoneSelectionScreenNode: ViewControllerTracingNode { self.present = present self.push = push - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string } diff --git a/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridSearchContentNode.swift b/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridSearchContentNode.swift index fea9ef8c23..17074511e3 100644 --- a/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridSearchContentNode.swift +++ b/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridSearchContentNode.swift @@ -354,7 +354,7 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode { self.presentationDataPromise = Promise(self.presentationData) self.dimNode = ASDisplayNode() - self.recentListNode = ListView() + self.recentListNode = ListViewImpl() self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.recentListNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift index abeec27d4f..e7361cbd53 100644 --- a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift +++ b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift @@ -463,7 +463,7 @@ private struct ChatHistoryAnimatedEmojiConfiguration { private var nextClientId: Int32 = 1 -public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHistoryListNode { +public final class ChatHistoryListNodeImpl: ListViewImpl, ChatHistoryNode, ChatHistoryListNode { static let fixedAdMessageStableId: UInt32 = UInt32.max - 5000 public let context: AccountContext diff --git a/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift b/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift index 69fc59bb37..447afbdc96 100644 --- a/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift +++ b/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift @@ -197,7 +197,7 @@ class ChatSearchResultsControllerNode: ViewControllerTracingNode, ASScrollViewDe self.animationCache = context.animationCache self.animationRenderer = context.animationRenderer - self.listNode = ListView() + self.listNode = ListViewImpl() self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor self.listNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string diff --git a/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift index cb8f712299..534f29ac7f 100644 --- a/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift @@ -297,7 +297,7 @@ final class CommandChatInputContextPanelNode: ChatInputContextPanelNode { self.backgroundView = GlassBackgroundView() self.backgroundView.layer.anchorPoint = CGPoint() - self.listView = ListView() + self.listView = ListViewImpl() self.listView.anchorPoint = CGPoint() self.listView.isOpaque = false self.listView.stackFromBottom = true diff --git a/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift index e0c4c9f491..d424abb064 100644 --- a/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift @@ -79,7 +79,7 @@ final class CommandMenuChatInputContextPanelNode: ChatInputContextPanelNode { self.backgroundView = GlassBackgroundView() self.backgroundView.layer.anchorPoint = CGPoint() - self.listView = ListView() + self.listView = ListViewImpl() self.listView.clipsToBounds = false self.listView.isOpaque = false self.listView.stackFromBottom = true diff --git a/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift index e66b38c535..c85b9b2421 100644 --- a/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift @@ -152,7 +152,7 @@ final class EmojisChatInputContextPanelNode: ChatInputContextPanelNode { self.clippingNode = ASDisplayNode() self.clippingNode.clipsToBounds = true - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = false self.listView.view.disablesInteractiveTransitionGestureRecognizer = true self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0) diff --git a/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift index fe9ce4eaa2..5a57356c20 100644 --- a/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift @@ -96,7 +96,7 @@ final class HashtagChatInputContextPanelNode: ChatInputContextPanelNode { self.backgroundView = GlassBackgroundView() self.backgroundView.layer.anchorPoint = CGPoint() - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = false self.listView.stackFromBottom = true self.listView.limitHitTestToNodes = true diff --git a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift index 17b1fbd232..c76495b3ec 100644 --- a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift @@ -96,7 +96,7 @@ final class HorizontalListContextResultsChatInputContextPanelNode: ChatInputCont private let batchVideoContext: QueueLocalObject override init(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, fontSize: PresentationFontSize, chatPresentationContext: ChatPresentationContext) { - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = true self.listView.backgroundColor = theme.list.plainBackgroundColor self.listView.transform = CATransform3DMakeRotation(-CGFloat(CGFloat.pi / 2.0), 0.0, 0.0, 1.0) diff --git a/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift index 16b9326cbc..c0d7a4c6ca 100644 --- a/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift @@ -80,7 +80,7 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode { self.backgroundView = GlassBackgroundView() self.backgroundView.layer.anchorPoint = CGPoint() - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = false self.listView.stackFromBottom = true self.listView.limitHitTestToNodes = true diff --git a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift index 1b037fed07..5ef372684d 100644 --- a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift @@ -144,7 +144,7 @@ final class VerticalListContextResultsChatInputContextPanelNode: ChatInputContex self.backgroundView = GlassBackgroundView() self.backgroundView.layer.anchorPoint = CGPoint() - self.listView = ListView() + self.listView = ListViewImpl() self.listView.isOpaque = false self.listView.stackFromBottom = true self.listView.limitHitTestToNodes = true diff --git a/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift b/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift index b1fcd23e6e..75d2142a62 100644 --- a/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift +++ b/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift @@ -226,7 +226,7 @@ class WebSearchControllerNode: ASDisplayNode { self.gridNode = GridNode() self.gridNode.backgroundColor = theme.list.plainBackgroundColor - self.recentQueriesNode = ListView() + self.recentQueriesNode = ListViewImpl() self.recentQueriesNode.backgroundColor = theme.list.plainBackgroundColor self.recentQueriesNode.accessibilityPageScrolledString = { row, count in return presentationData.strings.VoiceOver_ScrollStatus(row, count).string