mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix found media actions
This commit is contained in:
parent
5d55b67c3a
commit
ab5ffaf673
@ -281,7 +281,7 @@ final class ChatHistorySearchContainerNode: SearchDisplayControllerContentNode {
|
|||||||
transition.updateFrame(node: self.emptyResultsTextNode, frame: CGRect(origin: CGPoint(x: layout.safeInsets.left + padding + (layout.size.width - layout.safeInsets.left - layout.safeInsets.right - padding * 2.0 - emptyTextSize.width) / 2.0, y: emptyTitleY + emptyTitleSize.height + emptyTextSpacing), size: emptyTextSize))
|
transition.updateFrame(node: self.emptyResultsTextNode, frame: CGRect(origin: CGPoint(x: layout.safeInsets.left + padding + (layout.size.width - layout.safeInsets.left - layout.safeInsets.right - padding * 2.0 - emptyTextSize.width) / 2.0, y: emptyTitleY + emptyTitleSize.height + emptyTextSpacing), size: emptyTextSize))
|
||||||
|
|
||||||
self.listNode.frame = CGRect(origin: CGPoint(), size: layout.size)
|
self.listNode.frame = CGRect(origin: CGPoint(), size: layout.size)
|
||||||
self.listNode.transaction(deleteIndices: [], insertIndicesAndItems: [], updateIndicesAndItems: [], options: [.Synchronous], scrollToItem: nil, updateSizeAndInsets: ListViewUpdateSizeAndInsets(size: layout.size, insets: UIEdgeInsets(top: topInset, left: 0.0, bottom: 0.0, right: 0.0), duration: 0.0, curve: .Default(duration: nil)), stationaryItemRange: nil, updateOpaqueState: nil, completion: { _ in })
|
self.listNode.transaction(deleteIndices: [], insertIndicesAndItems: [], updateIndicesAndItems: [], options: [.Synchronous], scrollToItem: nil, updateSizeAndInsets: ListViewUpdateSizeAndInsets(size: layout.size, insets: UIEdgeInsets(top: topInset, left: 0.0, bottom: layout.intrinsicInsets.bottom, right: 0.0), duration: 0.0, curve: .Default(duration: nil)), stationaryItemRange: nil, updateOpaqueState: nil, completion: { _ in })
|
||||||
|
|
||||||
|
|
||||||
if firstValidLayout {
|
if firstValidLayout {
|
||||||
|
@ -1209,13 +1209,15 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
|
|||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let _ = storedMessageFromSearch(account: strongSelf.context.account, message: message).start()
|
||||||
|
|
||||||
let _ = (chatAvailableMessageActionsImpl(postbox: strongSelf.context.account.postbox, accountPeerId: strongSelf.context.account.peerId, messageIds: [message.id])
|
let _ = (chatAvailableMessageActionsImpl(postbox: strongSelf.context.account.postbox, accountPeerId: strongSelf.context.account.peerId, messageIds: [message.id])
|
||||||
|> deliverOnMainQueue).start(next: { actions in
|
|> deliverOnMainQueue).start(next: { actions in
|
||||||
|
|
||||||
var messageIds = Set<MessageId>()
|
var messageIds = Set<MessageId>()
|
||||||
messageIds.insert(message.id)
|
messageIds.insert(message.id)
|
||||||
|
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
if let message = strongSelf.paneContainerNode.findLoadedMessage(id: message.id) {
|
|
||||||
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
|
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
|
||||||
var items: [ActionSheetButtonItem] = []
|
var items: [ActionSheetButtonItem] = []
|
||||||
|
|
||||||
@ -1256,7 +1258,6 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
|
|||||||
strongSelf.view.endEditing(true)
|
strongSelf.view.endEditing(true)
|
||||||
strongSelf.controller?.present(actionSheet, in: .window(.root))
|
strongSelf.controller?.present(actionSheet, in: .window(.root))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}, openMessageContextActions: { [weak self] message, node, rect, gesture in
|
}, openMessageContextActions: { [weak self] message, node, rect, gesture in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user