Web app improvements

This commit is contained in:
Ilya Laktyushin 2022-04-08 18:15:07 +04:00
parent 9ff797d9a4
commit 72a752b29a
2 changed files with 8 additions and 2 deletions

View File

@ -2311,7 +2311,13 @@ public func svgIconImageFile(account: Account, fileReference: FileMediaReference
let imageOrientation: UIImage.Orientation = .up
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 {
fittedSize = image.size.aspectFitted(arguments.boundingSize)
}

View File

@ -300,7 +300,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
}
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)
transition.updateAlpha(layer: webView.layer, alpha: 1.0)
if let placeholderNode = self.placeholderNode {