mirror of
https://github.com/insidegui/VirtualBuddy.git
synced 2026-12-02 00:39:46 +08:00
29 lines
623 B
Swift
29 lines
623 B
Swift
//
|
|
// OpenVirtualBuddySettingsAction.swift
|
|
// VirtualBuddy
|
|
//
|
|
// Created by Guilherme Rambo on 20/06/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
import VirtualCore
|
|
import DeepLinkSecurity
|
|
import BuddyUI
|
|
|
|
public struct OpenVirtualBuddySettingsAction {
|
|
public var run: @MainActor () -> ()
|
|
|
|
public init(run: @escaping @MainActor () -> () = { preconditionFailure("Missing openVirtualBuddySettings in environment.") }) {
|
|
self.run = run
|
|
}
|
|
|
|
@MainActor
|
|
public func callAsFunction() {
|
|
run()
|
|
}
|
|
}
|
|
|
|
public extension EnvironmentValues {
|
|
@Entry var openVirtualBuddySettings = OpenVirtualBuddySettingsAction()
|
|
}
|