Do not blink circle while connected

This commit is contained in:
Davide De Rosa 2022-05-02 10:56:40 +02:00
parent cc681dfeab
commit d3bd41b251
1 changed files with 8 additions and 8 deletions

View File

@ -53,7 +53,7 @@ struct ProfileRow: View {
private let isActive: Bool
@State private var connectedOpacity = 1.0
// @State private var connectedOpacity = 1.0
init(isActive: Bool) {
currentVPNState = .shared
@ -90,13 +90,13 @@ struct ProfileRow: View {
private var profileImage: some View {
if isConnected {
Image(systemName: themeProfileConnectedImage)
.opacity(connectedOpacity)
.onAppear {
connectedOpacity = 1.0
withAnimation(.easeInOut(duration: 1.0).repeatForever(autoreverses: true)) {
connectedOpacity = 0.05
}
}
// .opacity(connectedOpacity)
// .onAppear {
// connectedOpacity = 1.0
// withAnimation(.easeInOut(duration: 1.0).repeatForever(autoreverses: true)) {
// connectedOpacity = 0.05
// }
// }
} else if isActive {
Image(systemName: themeProfileActiveImage)
} else {