mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various fixes
This commit is contained in:
@@ -156,6 +156,13 @@ public final class SolidRoundedButtonNode: ASDisplayNode {
|
||||
self.animationTimer = timer
|
||||
timer.start()
|
||||
}
|
||||
} else {
|
||||
self.animationNode?.play()
|
||||
let timer = SwiftSignalKit.Timer(timeout: 4.0, repeat: true, completion: { [weak self] in
|
||||
self?.animationNode?.play()
|
||||
}, queue: Queue.mainQueue())
|
||||
self.animationTimer = timer
|
||||
timer.start()
|
||||
}
|
||||
}
|
||||
} else if let animationNode = self.animationNode {
|
||||
@@ -173,6 +180,14 @@ public final class SolidRoundedButtonNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
public var animationSize: CGSize = CGSize(width: 30.0, height: 30.0) {
|
||||
didSet {
|
||||
if let width = self.validLayout {
|
||||
_ = self.updateLayout(width: width, transition: .immediate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public var iconPosition: SolidRoundedButtonIconPosition = .left {
|
||||
didSet {
|
||||
if let width = self.validLayout {
|
||||
@@ -559,7 +574,7 @@ public final class SolidRoundedButtonNode: ASDisplayNode {
|
||||
|
||||
let iconSize: CGSize
|
||||
if let _ = self.animationNode {
|
||||
iconSize = CGSize(width: 30.0, height: 30.0)
|
||||
iconSize = self.animationSize
|
||||
} else {
|
||||
iconSize = self.iconNode.image?.size ?? CGSize()
|
||||
}
|
||||
@@ -794,6 +809,13 @@ public final class SolidRoundedButtonView: UIView {
|
||||
self.animationTimer = timer
|
||||
timer.start()
|
||||
}
|
||||
} else {
|
||||
self.animationNode?.play()
|
||||
let timer = SwiftSignalKit.Timer(timeout: 4.0, repeat: true, completion: { [weak self] in
|
||||
self?.animationNode?.play()
|
||||
}, queue: Queue.mainQueue())
|
||||
self.animationTimer = timer
|
||||
timer.start()
|
||||
}
|
||||
}
|
||||
} else if let animationNode = self.animationNode {
|
||||
|
||||
Reference in New Issue
Block a user