Skip to content

Commit 12cf374

Browse files
authored
Set buttonStyle to be MainActor (#543)
1 parent 8062b4c commit 12cf374

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

GoogleSignInSwift/Sources/GoogleSignInButtonViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class GoogleSignInButtonViewModel: ObservableObject {
2828

2929
/// A computed property providing the button's size, colors, corner radius,
3030
/// and shadow based on this current view model's `SignInButtonStyle`.
31+
@MainActor
3132
var buttonStyle: SwiftUIButtonStyle {
3233
return SwiftUIButtonStyle(style: style, state: state, scheme: scheme)
3334
}

GoogleSignInSwift/Tests/Unit/GoogleSignInButtonStylingTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import XCTest
1818
@testable import GoogleSignInSwift
1919

20+
@MainActor
2021
@available(iOS 13.0, macOS 10.15, *)
2122
class GoogleSignInButtonStylingTests: XCTestCase {
2223
private typealias ButtonViewModelInfo = (

0 commit comments

Comments
 (0)