This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UserNotificationsHandling.swift | |
// | |
// Copyright © 2023 Eren Kabakci. All rights reserved. | |
// | |
import UserNotifications | |
import AppKit | |
// Generic local notifications API for any consumer to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precedencegroup FunctionBuilderUtility { | |
associativity: none | |
} | |
infix operator .. : FunctionBuilderUtility | |
@discardableResult | |
public func .. <T>(object: T, block: (inout T) -> Void) -> T { | |
var object = object | |
block(&object) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct magic_switcherApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
.environmentObject(ThemeObservable()) | |
} | |
} |
OlderNewer