Add 'osx/' from commit '46755a07ef2e7aa9852d74c30e2c12f9fe8f2278'
git-subtree-dir: osx git-subtree-mainline:034026e88agit-subtree-split:46755a07ef
This commit is contained in:
26
osx/kordophone2/Environment.swift
Normal file
26
osx/kordophone2/Environment.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Environment.swift
|
||||
// kordophone2
|
||||
//
|
||||
// Created by James Magahern on 8/29/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
extension EnvironmentValues
|
||||
{
|
||||
@Entry var xpcClient: XPCClient = XPCClient()
|
||||
@Entry var selectedConversation: Display.Conversation? = nil
|
||||
}
|
||||
|
||||
extension View
|
||||
{
|
||||
func xpcClient(_ client: XPCClient) -> some View {
|
||||
environment(\.xpcClient, client)
|
||||
}
|
||||
|
||||
func selectedConversation(_ convo: Display.Conversation?) -> some View {
|
||||
environment(\.selectedConversation, convo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user