mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Merge branch 'master' into postbox-refactoring-1
This commit is contained in:
@@ -2578,6 +2578,19 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
return false
|
||||
}
|
||||
|
||||
var hasAd = false
|
||||
self.historyNode.forEachVisibleItemNode { itemNode in
|
||||
if let itemNode = itemNode as? ChatMessageItemView {
|
||||
if let _ = itemNode.item?.message.adAttribute {
|
||||
hasAd = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if hasAd {
|
||||
return false
|
||||
}
|
||||
|
||||
switch self.historyNode.visibleContentOffset() {
|
||||
case let .known(value) where value < 20.0:
|
||||
return true
|
||||
@@ -2588,6 +2601,23 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
var shouldUseFastMessageSendAnimation: Bool {
|
||||
var hasAd = false
|
||||
self.historyNode.forEachVisibleItemNode { itemNode in
|
||||
if let itemNode = itemNode as? ChatMessageItemView {
|
||||
if let _ = itemNode.item?.message.adAttribute {
|
||||
hasAd = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if hasAd {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
var shouldAllowOverscrollActions: Bool {
|
||||
if let inputHeight = self.validLayout?.0.inputHeight, inputHeight > 0.0 {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user