mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Various fixes
This commit is contained in:
parent
6169910992
commit
6f2e4ce581
@ -529,6 +529,8 @@ final class BotCheckoutInfoControllerNode: ViewControllerTracingNode, UIScrollVi
|
|||||||
if let focusItem = focusItem as? BotPaymentFieldItemNode {
|
if let focusItem = focusItem as? BotPaymentFieldItemNode {
|
||||||
focusItem.activateInput()
|
focusItem.activateInput()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.scrollViewDidScroll(self.scrollNode.view)
|
||||||
}
|
}
|
||||||
} else if let previousLayout = previousLayout {
|
} else if let previousLayout = previousLayout {
|
||||||
var previousInsets = previousLayout.0.insets(options: [.input])
|
var previousInsets = previousLayout.0.insets(options: [.input])
|
||||||
|
|||||||
@ -1190,7 +1190,7 @@ public final class PeerInfoAvatarListContainerNode: ASDisplayNode {
|
|||||||
var additiveTransitionOffset: CGFloat = 0.0
|
var additiveTransitionOffset: CGFloat = 0.0
|
||||||
var itemsAdded = false
|
var itemsAdded = false
|
||||||
if self.currentIndex >= 0 && self.currentIndex < self.items.count {
|
if self.currentIndex >= 0 && self.currentIndex < self.items.count {
|
||||||
let preloadSpan: Int = 0
|
let preloadSpan: Int = 2
|
||||||
for i in max(0, self.currentIndex - preloadSpan) ... min(self.currentIndex + preloadSpan, self.items.count - 1) {
|
for i in max(0, self.currentIndex - preloadSpan) ... min(self.currentIndex + preloadSpan, self.items.count - 1) {
|
||||||
if self.items[i].representations.isEmpty {
|
if self.items[i].representations.isEmpty {
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -1061,7 +1061,7 @@ private class StorageUsageClearProgressOverlayNode: ASDisplayNode, ActionSheetGr
|
|||||||
self.progress = progress
|
self.progress = progress
|
||||||
|
|
||||||
if let size = self.validLayout {
|
if let size = self.validLayout {
|
||||||
self.updateLayout(size: size, transition: .animated(duration: 0.2, curve: .easeInOut))
|
self.updateLayout(size: size, transition: .animated(duration: 0.5, curve: .linear))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1075,8 +1075,8 @@ private class StorageUsageClearProgressOverlayNode: ASDisplayNode, ActionSheetGr
|
|||||||
let progressFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: size.width - inset * 2.0, height: progressHeight)
|
let progressFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: size.width - inset * 2.0, height: progressHeight)
|
||||||
self.progressBackgroundNode.frame = progressFrame
|
self.progressBackgroundNode.frame = progressFrame
|
||||||
let progressForegroundFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: floorToScreenPixels(progressFrame.width * CGFloat(self.progress)), height: progressHeight)
|
let progressForegroundFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: floorToScreenPixels(progressFrame.width * CGFloat(self.progress)), height: progressHeight)
|
||||||
if !self.progressForegroundNode.frame.width.isZero {
|
if !self.progressForegroundNode.frame.origin.x.isZero {
|
||||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame)
|
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame, beginWithCurrentState: true)
|
||||||
} else {
|
} else {
|
||||||
self.progressForegroundNode.frame = progressForegroundFrame
|
self.progressForegroundNode.frame = progressForegroundFrame
|
||||||
}
|
}
|
||||||
|
|||||||
@ -654,7 +654,7 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
delay = contentNode.completionDuration
|
delay = contentNode.completionDuration
|
||||||
|
|
||||||
if shouldDelay {
|
if shouldDelay {
|
||||||
Queue.mainQueue().after(delay - 3.0, {
|
Queue.mainQueue().after(delay - 1.5, {
|
||||||
if strongSelf.hapticFeedback == nil {
|
if strongSelf.hapticFeedback == nil {
|
||||||
strongSelf.hapticFeedback = HapticFeedback()
|
strongSelf.hapticFeedback = HapticFeedback()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ public final class ShareProlongedLoadingContainerNode: ASDisplayNode, ShareConte
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let (size, isLandscape, bottomInset) = self.validLayout {
|
if let (size, isLandscape, bottomInset) = self.validLayout {
|
||||||
self.updateLayout(size: size, isLandscape: isLandscape, bottomInset: bottomInset, transition: .animated(duration: 0.3, curve: .easeInOut))
|
self.updateLayout(size: size, isLandscape: isLandscape, bottomInset: bottomInset, transition: .animated(duration: 0.5, curve: .linear))
|
||||||
}
|
}
|
||||||
case .done:
|
case .done:
|
||||||
if let (size, isLandscape, bottomInset) = self.validLayout {
|
if let (size, isLandscape, bottomInset) = self.validLayout {
|
||||||
@ -282,8 +282,8 @@ public final class ShareProlongedLoadingContainerNode: ASDisplayNode, ShareConte
|
|||||||
let progressFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: size.width - inset * 2.0, height: progressHeight)
|
let progressFrame = CGRect(x: inset, y: size.height - inset - progressHeight, width: size.width - inset * 2.0, height: progressHeight)
|
||||||
self.progressBackgroundNode.frame = progressFrame
|
self.progressBackgroundNode.frame = progressFrame
|
||||||
let progressForegroundFrame = CGRect(x: progressFrame.minX, y: progressFrame.minY, width: floorToScreenPixels(progressFrame.width * progress), height: progressHeight)
|
let progressForegroundFrame = CGRect(x: progressFrame.minX, y: progressFrame.minY, width: floorToScreenPixels(progressFrame.width * progress), height: progressHeight)
|
||||||
if !self.progressForegroundNode.frame.width.isZero {
|
if !self.progressForegroundNode.frame.origin.x.isZero {
|
||||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame)
|
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame, beginWithCurrentState: true)
|
||||||
} else {
|
} else {
|
||||||
self.progressForegroundNode.frame = progressForegroundFrame
|
self.progressForegroundNode.frame = progressForegroundFrame
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,6 +137,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
|||||||
self.webView = webView
|
self.webView = webView
|
||||||
|
|
||||||
let placeholderNode = ShimmerEffectNode()
|
let placeholderNode = ShimmerEffectNode()
|
||||||
|
placeholderNode.allowsGroupOpacity = true
|
||||||
self.addSubnode(placeholderNode)
|
self.addSubnode(placeholderNode)
|
||||||
self.placeholderNode = placeholderNode
|
self.placeholderNode = placeholderNode
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user