Add support for tvOS
This commit is contained in:
@@ -7,7 +7,7 @@ import Library
|
||||
open class ApplicationDelegate: NSObject, NSApplicationDelegate {
|
||||
public func applicationDidFinishLaunching(_: Notification) {
|
||||
NSLog("Here I stand")
|
||||
// ServiceNotification.register() // Not work
|
||||
LibboxSetup(FilePath.sharedDirectory.relativePath, FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, false)
|
||||
let event = NSAppleEventManager.shared().currentAppleEvent
|
||||
let launchedAsLogInItem =
|
||||
event?.eventID == kAEOpenApplication &&
|
||||
|
||||
@@ -43,14 +43,6 @@ public struct MainView: View {
|
||||
}
|
||||
#endif
|
||||
.alertBinding($alert)
|
||||
.onAppear {
|
||||
ServiceNotification.setServiceNotificationListener { notification in
|
||||
alert = Alert(title: Text(notification.title), message: Text(notification.body))
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
ServiceNotification.removeServiceNotificationListener()
|
||||
}
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigation) {
|
||||
StartStopButton()
|
||||
|
||||
@@ -191,7 +191,7 @@ public struct MenuView: View {
|
||||
NotificationCenter.default.post(name: ActiveDashboardView.NotificationUpdateSelectedProfile, object: nil)
|
||||
if profile.status.isConnected {
|
||||
do {
|
||||
try LibboxNewStandaloneCommandClient(FilePath.sharedDirectory.relativePath)?.serviceReload()
|
||||
try LibboxNewStandaloneCommandClient()?.serviceReload()
|
||||
} catch {
|
||||
alert = Alert(error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user