mirror of
https://github.com/yattee/yattee.git
synced 2025-04-26 08:36:29 +00:00
Fix menu command for Popular
This commit is contained in:
parent
ca38133b1d
commit
5050ad5d02
@ -30,10 +30,10 @@ private struct CurrentPlaylistID: EnvironmentKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private struct LoadMoreContentHandler: EnvironmentKey {
|
private struct LoadMoreContentHandler: EnvironmentKey {
|
||||||
static let defaultValue: LoadMoreContentHandlerClosure = { print("infinite load") }
|
static let defaultValue: LoadMoreContentHandlerType = { }
|
||||||
}
|
}
|
||||||
|
|
||||||
typealias LoadMoreContentHandlerClosure = () -> Void
|
typealias LoadMoreContentHandlerType = () -> Void
|
||||||
|
|
||||||
extension EnvironmentValues {
|
extension EnvironmentValues {
|
||||||
var inNavigationView: Bool {
|
var inNavigationView: Bool {
|
||||||
@ -66,7 +66,7 @@ extension EnvironmentValues {
|
|||||||
set { self[CurrentPlaylistID.self] = newValue }
|
set { self[CurrentPlaylistID.self] = newValue }
|
||||||
}
|
}
|
||||||
|
|
||||||
var loadMoreContentHandler: LoadMoreContentHandlerClosure {
|
var loadMoreContentHandler: LoadMoreContentHandlerType {
|
||||||
get { self[LoadMoreContentHandler.self] }
|
get { self[LoadMoreContentHandler.self] }
|
||||||
set { self[LoadMoreContentHandler.self] = newValue }
|
set { self[LoadMoreContentHandler.self] = newValue }
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ struct MenuCommands: Commands {
|
|||||||
Button("Popular") {
|
Button("Popular") {
|
||||||
model.navigation?.tabSelection = .popular
|
model.navigation?.tabSelection = .popular
|
||||||
}
|
}
|
||||||
.disabled(!(model.accounts?.app.supportsPopular ?? true))
|
.disabled(!(model.accounts?.app.supportsPopular ?? false))
|
||||||
.keyboardShortcut("3")
|
.keyboardShortcut("3")
|
||||||
|
|
||||||
Button("Trending") {
|
Button("Trending") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user