mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge commit '6f2e4ce581debb7c2651468afb4884703ce3927d'
This commit is contained in:
commit
3b67110f83
@ -529,6 +529,8 @@ final class BotCheckoutInfoControllerNode: ViewControllerTracingNode, UIScrollVi
|
||||
if let focusItem = focusItem as? BotPaymentFieldItemNode {
|
||||
focusItem.activateInput()
|
||||
}
|
||||
|
||||
self.scrollViewDidScroll(self.scrollNode.view)
|
||||
}
|
||||
} else if let previousLayout = previousLayout {
|
||||
var previousInsets = previousLayout.0.insets(options: [.input])
|
||||
|
@ -1190,7 +1190,7 @@ public final class PeerInfoAvatarListContainerNode: ASDisplayNode {
|
||||
var additiveTransitionOffset: CGFloat = 0.0
|
||||
var itemsAdded = false
|
||||
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) {
|
||||
if self.items[i].representations.isEmpty {
|
||||
continue
|
||||
|
@ -1061,7 +1061,7 @@ private class StorageUsageClearProgressOverlayNode: ASDisplayNode, ActionSheetGr
|
||||
self.progress = progress
|
||||
|
||||
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)
|
||||
self.progressBackgroundNode.frame = progressFrame
|
||||
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 {
|
||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame)
|
||||
if !self.progressForegroundNode.frame.origin.x.isZero {
|
||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame, beginWithCurrentState: true)
|
||||
} else {
|
||||
self.progressForegroundNode.frame = progressForegroundFrame
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ final class LocalizationListControllerNode: ViewControllerTracingNode {
|
||||
if let localizationListState = localizationListState, !localizationListState.availableOfficialLocalizations.isEmpty {
|
||||
strongSelf.currentListState = localizationListState
|
||||
|
||||
if #available(iOS 15.0, *) {
|
||||
if #available(iOS 12.0, *) {
|
||||
entries.append(.translateTitle(text: presentationData.strings.Localization_TranslateMessages.uppercased()))
|
||||
entries.append(.translate(text: presentationData.strings.Localization_ShowTranslate, value: showTranslate))
|
||||
if showTranslate {
|
||||
|
@ -652,9 +652,19 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
||||
let delay: Double
|
||||
if let strongSelf = self, let contentNode = strongSelf.contentNode as? ShareProlongedLoadingContainerNode {
|
||||
delay = contentNode.completionDuration
|
||||
|
||||
if shouldDelay {
|
||||
Queue.mainQueue().after(delay - 1.5, {
|
||||
if strongSelf.hapticFeedback == nil {
|
||||
strongSelf.hapticFeedback = HapticFeedback()
|
||||
}
|
||||
strongSelf.hapticFeedback?.success()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
delay = max(minDelay, (timestamp + minDelay) - CACurrentMediaTime())
|
||||
}
|
||||
|
||||
Queue.mainQueue().after(delay, {
|
||||
self?.animateOut(shared: true, completion: {
|
||||
self?.dismiss?(true)
|
||||
@ -701,11 +711,6 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
||||
contentNode.state = .done
|
||||
if fromForeignApp {
|
||||
if !wasDone {
|
||||
if strongSelf.hapticFeedback == nil {
|
||||
strongSelf.hapticFeedback = HapticFeedback()
|
||||
}
|
||||
strongSelf.hapticFeedback?.success()
|
||||
|
||||
wasDone = true
|
||||
doneImpl(true)
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public final class ShareProlongedLoadingContainerNode: ASDisplayNode, ShareConte
|
||||
}
|
||||
|
||||
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:
|
||||
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)
|
||||
self.progressBackgroundNode.frame = progressFrame
|
||||
let progressForegroundFrame = CGRect(x: progressFrame.minX, y: progressFrame.minY, width: floorToScreenPixels(progressFrame.width * progress), height: progressHeight)
|
||||
if !self.progressForegroundNode.frame.width.isZero {
|
||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame)
|
||||
if !self.progressForegroundNode.frame.origin.x.isZero {
|
||||
transition.updateFrame(node: self.progressForegroundNode, frame: progressForegroundFrame, beginWithCurrentState: true)
|
||||
} else {
|
||||
self.progressForegroundNode.frame = progressForegroundFrame
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
||||
self.webView = webView
|
||||
|
||||
let placeholderNode = ShimmerEffectNode()
|
||||
placeholderNode.allowsGroupOpacity = true
|
||||
self.addSubnode(placeholderNode)
|
||||
self.placeholderNode = placeholderNode
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user