mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Web app improvements
This commit is contained in:
parent
9ff797d9a4
commit
72a752b29a
@ -2311,7 +2311,13 @@ public func svgIconImageFile(account: Account, fileReference: FileMediaReference
|
|||||||
let imageOrientation: UIImage.Orientation = .up
|
let imageOrientation: UIImage.Orientation = .up
|
||||||
|
|
||||||
if fullSizeComplete, let data = try? Data(contentsOf: URL(fileURLWithPath: fullSizePath)) {
|
if fullSizeComplete, let data = try? Data(contentsOf: URL(fileURLWithPath: fullSizePath)) {
|
||||||
fullSizeImage = renderPreparedImage(data, CGSize.zero, .clear, UIScreenScale)
|
let renderSize: CGSize
|
||||||
|
if stickToTop {
|
||||||
|
renderSize = .zero
|
||||||
|
} else {
|
||||||
|
renderSize = CGSize(width: 90.0, height: 90.0)
|
||||||
|
}
|
||||||
|
fullSizeImage = renderPreparedImage(data, renderSize, .clear, UIScreenScale)
|
||||||
if let image = fullSizeImage {
|
if let image = fullSizeImage {
|
||||||
fittedSize = image.size.aspectFitted(arguments.boundingSize)
|
fittedSize = image.size.aspectFitted(arguments.boundingSize)
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
|
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
|
||||||
Queue.mainQueue().after(1.0, {
|
Queue.mainQueue().after(0.6, {
|
||||||
let transition = ContainedViewLayoutTransition.animated(duration: 0.2, curve: .linear)
|
let transition = ContainedViewLayoutTransition.animated(duration: 0.2, curve: .linear)
|
||||||
transition.updateAlpha(layer: webView.layer, alpha: 1.0)
|
transition.updateAlpha(layer: webView.layer, alpha: 1.0)
|
||||||
if let placeholderNode = self.placeholderNode {
|
if let placeholderNode = self.placeholderNode {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user