Extract open URL action

This commit is contained in:
Arkadiusz Fal
2021-12-24 20:20:05 +01:00
parent 18d6000976
commit 91fa4ea2ff
6 changed files with 65 additions and 54 deletions

View File

@@ -41,12 +41,14 @@ struct YatteeApp: App {
player.handleEnterForeground()
}
#endif
#if !os(tvOS)
.handlesExternalEvents(preferring: Set(["watch"]), allowing: Set(["watch"]))
#if os(iOS)
.handlesExternalEvents(preferring: Set(["*"]), allowing: Set(["*"]))
#endif
}
#if os(iOS)
.handlesExternalEvents(matching: Set(["*"]))
#endif
#if !os(tvOS)
.handlesExternalEvents(matching: Set(arrayLiteral: "watch"))
.commands {
SidebarCommands()
@@ -78,14 +80,14 @@ struct YatteeApp: App {
.environmentObject(recents)
.environmentObject(subscriptions)
.environmentObject(thumbnails)
.handlesExternalEvents(preferring: Set(["player"]), allowing: Set(["player"]))
.handlesExternalEvents(preferring: Set(["player", "*"]), allowing: Set(["player", "*"]))
}
.handlesExternalEvents(matching: Set(["player"]))
.handlesExternalEvents(matching: Set(["player", "*"]))
Settings {
SettingsView()
.environmentObject(AccountsModel())
.environmentObject(InstancesModel())
.environmentObject(accounts)
.environmentObject(instances)
.environmentObject(updater)
}
#endif