Fix url opening

This commit is contained in:
Arkadiusz Fal 2023-04-22 15:50:46 +02:00
parent a9e9fa3a6d
commit 160ea86298
2 changed files with 3 additions and 2 deletions

View File

@ -163,7 +163,9 @@ struct OpenURLHandler {
resource
.load()
.onSuccess { response in
if let channel: Channel = response.typedContent() {
if let page: ChannelPage = response.typedContent(),
let channel = page.channel
{
DispatchQueue.main.async {
NavigationModel.shared.openChannel(
channel,

View File

@ -110,7 +110,6 @@ struct YatteeApp: App {
.onDisappear { player.presentingPlayer = false }
.environment(\.managedObjectContext, persistenceController.container.viewContext)
.environment(\.navigationStyle, .sidebar)
.handlesExternalEvents(preferring: Set(["player", "*"]), allowing: Set(["player", "*"]))
}
.handlesExternalEvents(matching: Set(["player", "*"]))