Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Loop/Extensions/Notification+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension Notification.Name {
static let didLoop = Notification.Name("didLoop")

@discardableResult
func onRecieve(object: Any? = nil, using: @escaping (Notification) -> Void) -> NSObjectProtocol {
func onReceive(object: Any? = nil, using: @escaping (Notification) -> Void) -> NSObjectProtocol {
return NotificationCenter.default.addObserver(
forName: self,
object: object,
Expand Down
2 changes: 1 addition & 1 deletion Loop/Extensions/View+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import SwiftUI

extension View {
// Make it easier to recieve notifications SwiftUI views
// Make it easier to receive notifications SwiftUI views
func onReceive(
_ name: Notification.Name,
center: NotificationCenter = .default,
Expand Down
4 changes: 2 additions & 2 deletions Loop/Managers/LoopManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class LoopManager: ObservableObject {
}
}

Notification.Name.forceCloseLoop.onRecieve { _ in
Notification.Name.forceCloseLoop.onReceive { _ in
self.closeLoop(forceClose: true)
}

Notification.Name.updateBackendDirection.onRecieve { notification in
Notification.Name.updateBackendDirection.onReceive { notification in
if let action = notification.userInfo?["action"] as? WindowAction {
self.changeAction(action)
}
Expand Down
4 changes: 2 additions & 2 deletions Loop/Preview Window/PreviewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PreviewController {
private var window: Window?

init() {
Notification.Name.updateUIDirection.onRecieve { obj in
Notification.Name.updateUIDirection.onReceive { obj in
if let action = obj.userInfo?["action"] as? WindowAction {
self.setAction(to: action)
}
Expand Down Expand Up @@ -105,6 +105,6 @@ class PreviewController {
windowController.window?.animator().alphaValue = shouldBeTransparent ? 0 : 1
}

print("New preview window action recieved: \(action.direction)")
print("New preview window action received: \(action.direction)")
}
}
4 changes: 2 additions & 2 deletions Loop/Radial Menu/RadialMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ struct RadialMenuView: View {
if !self.previewMode, let action = obj.userInfo?["action"] as? WindowAction {
self.currentAction = .init(action.direction.base)

print("New radial menu window action recieved: \(action.direction)")
print("New radial menu window action received: \(action.direction)")
}
}
}
}
}