mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
1e14a6c687
commit
cd9026f55b
@ -26,9 +26,8 @@ final class BrowserWebContent: UIView, BrowserContent, UIScrollViewDelegate {
|
|||||||
let configuration = WKWebViewConfiguration()
|
let configuration = WKWebViewConfiguration()
|
||||||
|
|
||||||
self.webView = WKWebView(frame: CGRect(), configuration: configuration)
|
self.webView = WKWebView(frame: CGRect(), configuration: configuration)
|
||||||
if #available(iOSApplicationExtension 9.0, iOS 9.0, *) {
|
|
||||||
self.webView.allowsLinkPreview = false
|
self.webView.allowsLinkPreview = false
|
||||||
}
|
|
||||||
if #available(iOSApplicationExtension 11.0, iOS 11.0, *) {
|
if #available(iOSApplicationExtension 11.0, iOS 11.0, *) {
|
||||||
self.webView.scrollView.contentInsetAdjustmentBehavior = .never
|
self.webView.scrollView.contentInsetAdjustmentBehavior = .never
|
||||||
}
|
}
|
||||||
|
@ -127,11 +127,9 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
|||||||
case _ as TelegramMediaImage:
|
case _ as TelegramMediaImage:
|
||||||
if message.text.isEmpty {
|
if message.text.isEmpty {
|
||||||
messageText = strings.Message_Photo
|
messageText = strings.Message_Photo
|
||||||
} else if #available(iOSApplicationExtension 9.0, iOS 9.0, *) {
|
} else if enableMediaEmoji {
|
||||||
if enableMediaEmoji {
|
|
||||||
messageText = "🖼 \(messageText)"
|
messageText = "🖼 \(messageText)"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
case let fileMedia as TelegramMediaFile:
|
case let fileMedia as TelegramMediaFile:
|
||||||
var processed = false
|
var processed = false
|
||||||
inner: for attribute in fileMedia.attributes {
|
inner: for attribute in fileMedia.attributes {
|
||||||
@ -188,7 +186,7 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
|||||||
if message.text.isEmpty {
|
if message.text.isEmpty {
|
||||||
messageText = strings.Message_Video
|
messageText = strings.Message_Video
|
||||||
processed = true
|
processed = true
|
||||||
} else if #available(iOSApplicationExtension 9.0, iOS 9.0, *) {
|
} else {
|
||||||
if enableMediaEmoji {
|
if enableMediaEmoji {
|
||||||
if !fileMedia.isAnimated {
|
if !fileMedia.isAnimated {
|
||||||
messageText = "📹 \(messageText)"
|
messageText = "📹 \(messageText)"
|
||||||
|
@ -209,15 +209,6 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
self.cancel = cancel
|
self.cancel = cancel
|
||||||
|
|
||||||
self.effectView = UIVisualEffectView()
|
self.effectView = UIVisualEffectView()
|
||||||
if #available(iOS 9.0, *) {
|
|
||||||
} else {
|
|
||||||
if self.presentationData.theme.rootController.keyboardColor == .dark {
|
|
||||||
self.effectView.effect = UIBlurEffect(style: .dark)
|
|
||||||
} else {
|
|
||||||
self.effectView.effect = UIBlurEffect(style: .light)
|
|
||||||
}
|
|
||||||
self.effectView.alpha = 0.0
|
|
||||||
}
|
|
||||||
|
|
||||||
self.dimNode = ASDisplayNode()
|
self.dimNode = ASDisplayNode()
|
||||||
self.dimNode.alpha = 1.0
|
self.dimNode.alpha = 1.0
|
||||||
@ -430,14 +421,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
}
|
}
|
||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
|
|
||||||
if #available(iOS 9.0, *) {
|
self.effectView.effect = makeCustomZoomBlurEffect(isLight: self.presentationData.theme.rootController.keyboardColor == .light)
|
||||||
} else {
|
|
||||||
if self.presentationData.theme.rootController.keyboardColor == .dark {
|
|
||||||
self.effectView.effect = UIBlurEffect(style: .dark)
|
|
||||||
} else {
|
|
||||||
self.effectView.effect = UIBlurEffect(style: .light)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.dimNode.backgroundColor = presentationData.theme.contextMenu.dimColor
|
self.dimNode.backgroundColor = presentationData.theme.contextMenu.dimColor
|
||||||
|
|
||||||
@ -465,11 +449,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
self.textInputNode.textView.setContentOffset(self.textInputNode.textView.contentOffset, animated: false)
|
self.textInputNode.textView.setContentOffset(self.textInputNode.textView.contentOffset, animated: false)
|
||||||
|
|
||||||
UIView.animate(withDuration: 0.2, animations: {
|
UIView.animate(withDuration: 0.2, animations: {
|
||||||
if #available(iOS 9.0, *) {
|
self.effectView.effect = makeCustomZoomBlurEffect(isLight: self.presentationData.theme.rootController.keyboardColor == .light)
|
||||||
self.effectView.effect = makeCustomZoomBlurEffect(isLight: !self.presentationData.theme.overallDarkAppearance)
|
|
||||||
} else {
|
|
||||||
self.effectView.alpha = 1.0
|
|
||||||
}
|
|
||||||
}, completion: { _ in })
|
}, completion: { _ in })
|
||||||
self.dimNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
self.dimNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||||
self.contentContainerNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
self.contentContainerNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||||
@ -562,12 +542,8 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UIView.animate(withDuration: 0.4, animations: {
|
UIView.animate(withDuration: 0.2, animations: {
|
||||||
if #available(iOS 9.0, *) {
|
|
||||||
self.effectView.effect = nil
|
self.effectView.effect = nil
|
||||||
} else {
|
|
||||||
self.effectView.alpha = 0.0
|
|
||||||
}
|
|
||||||
}, completion: { _ in
|
}, completion: { _ in
|
||||||
completedEffect = true
|
completedEffect = true
|
||||||
intermediateCompletion()
|
intermediateCompletion()
|
||||||
@ -596,7 +572,6 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
let duration = 0.4
|
let duration = 0.4
|
||||||
|
|
||||||
self.sendButtonNode.layer.animatePosition(from: self.sendButtonNode.position, to: self.sendButtonFrame.center, duration: duration, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false, completion: { _ in
|
self.sendButtonNode.layer.animatePosition(from: self.sendButtonNode.position, to: self.sendButtonFrame.center, duration: duration, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false, completion: { _ in
|
||||||
completedButton = true
|
completedButton = true
|
||||||
intermediateCompletion()
|
intermediateCompletion()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user