From ac22c025e174e9f7442135bede6bd65fec31c554 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 18 Jul 2023 02:18:34 +0400 Subject: [PATCH] Update progress radius --- .../Sources/StoryPeerListItemComponent.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListItemComponent.swift b/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListItemComponent.swift index 5e09bb7b74..110968e8aa 100644 --- a/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListItemComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListItemComponent.swift @@ -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