mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Various fixes
This commit is contained in:
@@ -4403,7 +4403,16 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
||||
func scrollToTop() -> Bool {
|
||||
if !self.mediaNode.isHidden {
|
||||
return self.mediaNode.scrollToTop()
|
||||
} else if !self.recentListNode.isHidden {
|
||||
let offset = self.recentListNode.visibleContentOffset()
|
||||
switch offset {
|
||||
case let .known(value) where value <= CGFloat.ulpOfOne:
|
||||
return false
|
||||
default:
|
||||
self.recentListNode.transaction(deleteIndices: [], insertIndicesAndItems: [], updateIndicesAndItems: [], options: [.Synchronous, .LowLatency], scrollToItem: ListViewScrollToItem(index: 0, position: .top(0.0), animated: true, curve: .Default(duration: nil), directionHint: .Up), updateSizeAndInsets: nil, stationaryItemRange: nil, updateOpaqueState: nil, completion: { _ in })
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
let offset = self.listNode.visibleContentOffset()
|
||||
switch offset {
|
||||
case let .known(value) where value <= CGFloat.ulpOfOne:
|
||||
@@ -4413,6 +4422,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func update(size: CGSize, sideInset: CGFloat, bottomInset: CGFloat, visibleHeight: CGFloat, presentationData: PresentationData, synchronous: Bool, transition: ContainedViewLayoutTransition) {
|
||||
let hadValidLayout = self.currentParams != nil
|
||||
|
||||
@@ -1274,6 +1274,9 @@ final class PeerSelectionControllerNode: ASDisplayNode {
|
||||
if updated {
|
||||
strongSelf.textInputPanelNode?.updateSendButtonEnabled(count > 0, animated: true)
|
||||
strongSelf.requestDeactivateSearch?()
|
||||
if let (layout, navigationBarHeight, actualNavigationBarHeight) = strongSelf.containerLayout {
|
||||
strongSelf.containerLayoutUpdated(layout, navigationBarHeight: navigationBarHeight, actualNavigationBarHeight: actualNavigationBarHeight, transition: .immediate)
|
||||
}
|
||||
} else if let requestOpenPeerFromSearch = strongSelf.requestOpenPeerFromSearch {
|
||||
requestOpenPeerFromSearch(peer, threadId)
|
||||
}
|
||||
|
||||
@@ -324,7 +324,8 @@ private final class WebAppMessagePreviewSheetComponent: CombinedComponent {
|
||||
preparedMessage: context.component.preparedMessage,
|
||||
dismiss: {
|
||||
animateOut.invoke(Action { _ in
|
||||
if let controller = controller() {
|
||||
if let controller = controller() as? WebAppMessagePreviewScreen {
|
||||
controller.completeWithResult(false)
|
||||
controller.dismiss(completion: nil)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user