mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 15:37:01 +00:00
Update progress radius
This commit is contained in:
parent
0aab71f544
commit
ac22c025e1
@ -134,6 +134,7 @@ private final class StoryProgressLayer: HierarchyTrackingLayer {
|
||||
private struct Params: Equatable {
|
||||
var size: CGSize
|
||||
var lineWidth: CGFloat
|
||||
var radius: CGFloat
|
||||
var value: Value
|
||||
}
|
||||
private var currentParams: Params?
|
||||
@ -246,11 +247,16 @@ private final class StoryProgressLayer: HierarchyTrackingLayer {
|
||||
let params = Params(
|
||||
size: size,
|
||||
lineWidth: lineWidth,
|
||||
radius: radius,
|
||||
value: value
|
||||
)
|
||||
if self.currentParams == params {
|
||||
return
|
||||
}
|
||||
if self.currentParams?.radius != params.radius {
|
||||
self.uploadProgressLayer.path = nil
|
||||
self.indefiniteDashLayer.path = nil
|
||||
}
|
||||
self.currentParams = params
|
||||
|
||||
self.uploadProgressLayer.lineWidth = lineWidth
|
||||
|
Loading…
x
Reference in New Issue
Block a user