mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix opening channels and playlists
This commit is contained in:
parent
4c5ef920b4
commit
97af5a6e0c
@ -85,7 +85,6 @@ struct ChannelPlaylistView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if os(macOS)
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .cancellationAction) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
if showCloseButton {
|
if showCloseButton {
|
||||||
@ -97,7 +96,9 @@ struct ChannelPlaylistView: View {
|
|||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#if os(macOS)
|
||||||
|
.toolbar {
|
||||||
ToolbarItem(placement: playlistButtonsPlacement) {
|
ToolbarItem(placement: playlistButtonsPlacement) {
|
||||||
HStack {
|
HStack {
|
||||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||||
|
@ -102,7 +102,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
.onOpenURL { url in
|
.onOpenURL { url in
|
||||||
URLBookmarkModel.shared.saveBookmark(url)
|
URLBookmarkModel.shared.saveBookmark(url)
|
||||||
OpenURLHandler.shared.handle(url)
|
OpenURLHandler(navigationStyle: navigationStyle).handle(url)
|
||||||
}
|
}
|
||||||
.background(
|
.background(
|
||||||
EmptyView().sheet(isPresented: $navigation.presentingAddToPlaylist) {
|
EmptyView().sheet(isPresented: $navigation.presentingAddToPlaylist) {
|
||||||
|
@ -4,7 +4,6 @@ import Siesta
|
|||||||
|
|
||||||
struct OpenURLHandler {
|
struct OpenURLHandler {
|
||||||
static var firstHandle = true
|
static var firstHandle = true
|
||||||
static var shared = Self()
|
|
||||||
static let yatteeProtocol = "yattee://"
|
static let yatteeProtocol = "yattee://"
|
||||||
|
|
||||||
var accounts: AccountsModel { .shared }
|
var accounts: AccountsModel { .shared }
|
||||||
@ -12,7 +11,7 @@ struct OpenURLHandler {
|
|||||||
var recents: RecentsModel { .shared }
|
var recents: RecentsModel { .shared }
|
||||||
var player: PlayerModel { .shared }
|
var player: PlayerModel { .shared }
|
||||||
var search: SearchModel { .shared }
|
var search: SearchModel { .shared }
|
||||||
var navigationStyle = NavigationStyle.sidebar
|
var navigationStyle: NavigationStyle
|
||||||
|
|
||||||
func handle(_ url: URL) {
|
func handle(_ url: URL) {
|
||||||
if accounts.current.isNil {
|
if accounts.current.isNil {
|
||||||
|
Loading…
Reference in New Issue
Block a user