mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Attachment menu improvements
This commit is contained in:
parent
7b8c90fbdc
commit
55da083bb0
@ -324,8 +324,6 @@ public final class LocationPickerController: ViewController, AttachmentContainab
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.navigationBar?.passthroughTouches = false
|
self.navigationBar?.passthroughTouches = false
|
||||||
|
|
||||||
self.updateTabBarAlpha(1.0, .immediate)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||||
@ -349,8 +347,4 @@ public final class LocationPickerController: ViewController, AttachmentContainab
|
|||||||
self.interaction?.dismissSearch()
|
self.interaction?.dismissSearch()
|
||||||
self.scrollToTop?()
|
self.scrollToTop?()
|
||||||
}
|
}
|
||||||
|
|
||||||
public func prepareForReuse() {
|
|
||||||
self.updateTabBarAlpha(1.0, .immediate)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -953,7 +953,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
|
|||||||
|
|
||||||
if self.locationAccessDenied {
|
if self.locationAccessDenied {
|
||||||
self.controller?.navigationBar?.updateBackgroundAlpha(0.0, transition: .immediate)
|
self.controller?.navigationBar?.updateBackgroundAlpha(0.0, transition: .immediate)
|
||||||
Queue.mainQueue().after(0.2) {
|
Queue.mainQueue().after(0.25) {
|
||||||
self.controller?.updateTabBarAlpha(0.0, .immediate)
|
self.controller?.updateTabBarAlpha(0.0, .immediate)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -989,10 +989,14 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
|
|||||||
let placeholderFrame = CGRect(origin: CGPoint(), size: layout.size)
|
let placeholderFrame = CGRect(origin: CGPoint(), size: layout.size)
|
||||||
backgroundNode.update(size: placeholderFrame.size, transition: placeholderTransition)
|
backgroundNode.update(size: placeholderFrame.size, transition: placeholderTransition)
|
||||||
placeholderTransition.updateFrame(node: placeholderNode, frame: placeholderFrame)
|
placeholderTransition.updateFrame(node: placeholderNode, frame: placeholderFrame)
|
||||||
} else if let placeholderNode = self.placeholderNode {
|
} else {
|
||||||
|
if let placeholderNode = self.placeholderNode {
|
||||||
self.placeholderNode = nil
|
self.placeholderNode = nil
|
||||||
placeholderNode.removeFromSupernode()
|
placeholderNode.removeFromSupernode()
|
||||||
}
|
}
|
||||||
|
self.controller?.updateTabBarAlpha(1.0, .immediate)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateSendActionHighlight(_ highlighted: Bool) {
|
func updateSendActionHighlight(_ highlighted: Bool) {
|
||||||
|
|||||||
@ -630,7 +630,7 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable {
|
|||||||
self.controller?.navigationBar?.updateBackgroundAlpha(0.0, transition: .immediate)
|
self.controller?.navigationBar?.updateBackgroundAlpha(0.0, transition: .immediate)
|
||||||
|
|
||||||
if delayDisappear {
|
if delayDisappear {
|
||||||
Queue.mainQueue().after(0.2) {
|
Queue.mainQueue().after(0.25) {
|
||||||
self.controller?.updateTabBarAlpha(0.0, transition)
|
self.controller?.updateTabBarAlpha(0.0, transition)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -310,7 +310,7 @@ public func attachmentFileController(context: AccountContext, updatedPresentatio
|
|||||||
case let .known(value):
|
case let .known(value):
|
||||||
let backgroundAlpha: CGFloat = min(30.0, max(0.0, value)) / 30.0
|
let backgroundAlpha: CGFloat = min(30.0, max(0.0, value)) / 30.0
|
||||||
if backgroundAlpha.isZero && controller?.delayDisappear == true {
|
if backgroundAlpha.isZero && controller?.delayDisappear == true {
|
||||||
Queue.mainQueue().after(0.2, {
|
Queue.mainQueue().after(0.25, {
|
||||||
controller?.updateTabBarAlpha(backgroundAlpha, .animated(duration: 0.1, curve: .easeInOut))
|
controller?.updateTabBarAlpha(backgroundAlpha, .animated(duration: 0.1, curve: .easeInOut))
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user