Various improvements

This commit is contained in:
Ilya Laktyushin
2022-12-17 15:35:00 +04:00
parent aeafae62df
commit 77df1cf45a
182 changed files with 6119 additions and 5449 deletions

View File

@@ -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?)

View File

@@ -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)