mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Various improvements
This commit is contained in:
@@ -39,7 +39,7 @@ public enum UndoOverlayContent {
|
||||
case mediaSaved(text: String)
|
||||
case paymentSent(currencyValue: String, itemTitle: String)
|
||||
case inviteRequestSent(title: String, text: String)
|
||||
case image(image: UIImage, title: String?, text: String, undo: Bool)
|
||||
case image(image: UIImage, title: String?, text: String, round: Bool, undo: Bool)
|
||||
case notificationSoundAdded(title: String, text: String, action: (() -> Void)?)
|
||||
case universal(animation: String, scale: CGFloat, colors: [String: UIColor], title: String?, text: String, customUndoText: String?)
|
||||
case peers(context: AccountContext, peers: [EnginePeer], title: String?, text: String, customUndoText: String?)
|
||||
|
||||
@@ -860,13 +860,13 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
|
||||
} else {
|
||||
displayUndo = false
|
||||
}
|
||||
case let .image(image, title, text, undo):
|
||||
case let .image(image, title, text, round, undo):
|
||||
self.avatarNode = nil
|
||||
self.iconNode = ASImageNode()
|
||||
self.iconNode?.clipsToBounds = true
|
||||
self.iconNode?.contentMode = .scaleAspectFill
|
||||
self.iconNode?.image = image
|
||||
self.iconNode?.cornerRadius = 4.0
|
||||
self.iconNode?.cornerRadius = round ? 16.0 : 4.0
|
||||
self.iconImageSize = CGSize(width: 32.0, height: 32.0)
|
||||
self.iconCheckNode = nil
|
||||
self.animationNode = nil
|
||||
@@ -1100,7 +1100,7 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
|
||||
self.content = content
|
||||
|
||||
switch content {
|
||||
case let .image(image, title, text, _):
|
||||
case let .image(image, title, text, _, _):
|
||||
self.iconNode?.image = image
|
||||
if let title = title {
|
||||
self.titleNode.attributedText = NSAttributedString(string: title, font: Font.semibold(14.0), textColor: .white)
|
||||
|
||||
Reference in New Issue
Block a user