From bfcac8d2b28452bf2224f3503237113781530aeb Mon Sep 17 00:00:00 2001 From: forgotvas Date: Wed, 12 Jun 2024 19:29:19 +0300 Subject: [PATCH] fix: double loading indicator for Explore all courses link [iOS] Fix double loading indicator for Explore all courses link #435 --- Core/Core/View/Base/ProgressBar.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/Core/View/Base/ProgressBar.swift b/Core/Core/View/Base/ProgressBar.swift index 7bc6e5195..b3be390e7 100644 --- a/Core/Core/View/Base/ProgressBar.swift +++ b/Core/Core/View/Base/ProgressBar.swift @@ -40,17 +40,18 @@ public struct ProgressBar: View { Circle() .stroke(lineWidth: lineWidth) .foregroundColor(Theme.Colors.accentColor.opacity(0.3)) - .frame(width: size, height: size) Circle() .trim(from: 0.0, to: 0.7) .stroke(gradient, style: StrokeStyle(lineWidth: lineWidth, lineCap: .round)) - .frame(width: size, height: size) - .rotationEffect(Angle.degrees(isAnimating ? 360 : 0), anchor: .center) - .animation(animation, value: isAnimating) } + .frame(width: size, height: size) + .rotationEffect(Angle.degrees(isAnimating ? 360 : 0), anchor: .center) + .animation(animation, value: isAnimating) .onAppear { - isAnimating = true + DispatchQueue.main.async { + isAnimating = true + } } } }