Fix menu command for Popular

This commit is contained in:
Arkadiusz Fal 2022-01-09 15:47:24 +01:00
parent ca38133b1d
commit 5050ad5d02
2 changed files with 4 additions and 4 deletions

View File

@ -30,10 +30,10 @@ private struct CurrentPlaylistID: EnvironmentKey {
}
private struct LoadMoreContentHandler: EnvironmentKey {
static let defaultValue: LoadMoreContentHandlerClosure = { print("infinite load") }
static let defaultValue: LoadMoreContentHandlerType = { }
}
typealias LoadMoreContentHandlerClosure = () -> Void
typealias LoadMoreContentHandlerType = () -> Void
extension EnvironmentValues {
var inNavigationView: Bool {
@ -66,7 +66,7 @@ extension EnvironmentValues {
set { self[CurrentPlaylistID.self] = newValue }
}
var loadMoreContentHandler: LoadMoreContentHandlerClosure {
var loadMoreContentHandler: LoadMoreContentHandlerType {
get { self[LoadMoreContentHandler.self] }
set { self[LoadMoreContentHandler.self] = newValue }
}

View File

@ -25,7 +25,7 @@ struct MenuCommands: Commands {
Button("Popular") {
model.navigation?.tabSelection = .popular
}
.disabled(!(model.accounts?.app.supportsPopular ?? true))
.disabled(!(model.accounts?.app.supportsPopular ?? false))
.keyboardShortcut("3")
Button("Trending") {