Skip to content

Commit 4dce71b

Browse files
authored
Merge pull request #8 from Miiha/fix/typo
Fixes typo in DelegateAction
2 parents 94b1a3b + 360fdd5 commit 4dce71b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Examples/Example/Example/App.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct App: ReducerProtocol {
1515
case remoteCountResponse(TaskResult<Int>)
1616
case requestAuthorizationResponse(TaskResult<Bool>)
1717
case tappedScheduleButton
18-
case userNotifications(UserNotificationClient.DeletegateAction)
18+
case userNotifications(UserNotificationClient.DelegateAction)
1919
}
2020

2121
@Dependency(\.remote) var remote

Examples/Example/ExampleTests/ExampleTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import XCTest
77
@MainActor
88
class ExampleTests: XCTestCase {
99
func testApplicationLaunchWithoutNotification() async throws {
10-
let delegate = AsyncStream<UserNotificationClient.DeletegateAction>.streamWithContinuation()
10+
let delegate = AsyncStream<UserNotificationClient.DelegateAction>.streamWithContinuation()
1111
let requestedAuthorizationOptions = ActorIsolated<UNAuthorizationOptions?>(nil)
1212
let store = TestStore(
1313
initialState: App.State(count: nil),
@@ -27,7 +27,7 @@ class ExampleTests: XCTestCase {
2727
}
2828

2929
func testApplicationLaunchWithtNotification() async throws {
30-
let delegate = AsyncStream<UserNotificationClient.DeletegateAction>.streamWithContinuation()
30+
let delegate = AsyncStream<UserNotificationClient.DelegateAction>.streamWithContinuation()
3131
let requestedAuthorizationOptions = ActorIsolated<UNAuthorizationOptions?>(nil)
3232

3333
let store = TestStore(
@@ -51,7 +51,7 @@ class ExampleTests: XCTestCase {
5151
}
5252

5353
func testNotificationPresentationHandling() async throws {
54-
let delegate = AsyncStream<UserNotificationClient.DeletegateAction>.streamWithContinuation()
54+
let delegate = AsyncStream<UserNotificationClient.DelegateAction>.streamWithContinuation()
5555

5656
let store = TestStore(
5757
initialState: App.State(count: nil),
@@ -95,7 +95,7 @@ class ExampleTests: XCTestCase {
9595
}
9696

9797
func testReceivedNotification() async throws {
98-
let delegate = AsyncStream<UserNotificationClient.DeletegateAction>.streamWithContinuation()
98+
let delegate = AsyncStream<UserNotificationClient.DelegateAction>.streamWithContinuation()
9999

100100
let store = TestStore(
101101
initialState: App.State(count: nil),

Sources/ComposableUserNotifications/Interface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct UserNotificationClient {
1414
/// Actions that correspond to `UNUserNotificationCenterDelegate` methods.
1515
///
1616
/// See `UNUserNotificationCenterDelegate` for more information.
17-
public enum DeletegateAction {
17+
public enum DelegateAction {
1818
case willPresentNotification(
1919
_ notification: Notification,
2020
completionHandler: (UNNotificationPresentationOptions) -> Void)
@@ -59,11 +59,11 @@ public struct UserNotificationClient {
5959
/// This Effect represents calls to the `UNUserNotificationCenterDelegate`.
6060
/// Handling the completion handlers of the `UNUserNotificationCenterDelegate`s methods
6161
/// by multiple observers might lead to unexpected behaviour.
62-
public var delegate: @Sendable () -> AsyncStream<DeletegateAction> = unimplemented("\(Self.self).delegate", placeholder: .finished)
62+
public var delegate: @Sendable () -> AsyncStream<DelegateAction> = unimplemented("\(Self.self).delegate", placeholder: .finished)
6363
}
6464

65-
extension UserNotificationClient.DeletegateAction: Equatable {
66-
public static func == (lhs: UserNotificationClient.DeletegateAction, rhs: UserNotificationClient.DeletegateAction) -> Bool {
65+
extension UserNotificationClient.DelegateAction: Equatable {
66+
public static func == (lhs: UserNotificationClient.DelegateAction, rhs: UserNotificationClient.DelegateAction) -> Bool {
6767
switch (lhs, rhs) {
6868
case let (.willPresentNotification(lhs, _), .willPresentNotification(rhs, _)):
6969
return lhs == rhs

Sources/ComposableUserNotifications/LiveKey.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ extension UserNotificationClient: DependencyKey {
8282

8383
private extension UserNotificationClient {
8484
class Delegate: NSObject, UNUserNotificationCenterDelegate {
85-
let continuation: AsyncStream<UserNotificationClient.DeletegateAction>.Continuation
85+
let continuation: AsyncStream<UserNotificationClient.DelegateAction>.Continuation
8686

87-
init(continuation: AsyncStream<UserNotificationClient.DeletegateAction>.Continuation) {
87+
init(continuation: AsyncStream<UserNotificationClient.DelegateAction>.Continuation) {
8888
self.continuation = continuation
8989
}
9090

0 commit comments

Comments
 (0)