Home settings

This commit is contained in:
Arkadiusz Fal
2022-11-11 21:28:40 +01:00
parent ef1f95a3ad
commit 51bd46b3ae
11 changed files with 202 additions and 139 deletions

View File

@@ -29,6 +29,7 @@ struct SearchView: View {
@Default(.recentlyOpened) private var recentlyOpened
@Default(.saveRecents) private var saveRecents
@Default(.showHome) private var showHome
private var videos = [Video]()
@@ -209,13 +210,11 @@ struct SearchView: View {
visibleSections.append(.playlists)
}
[VisibleSection.home, .trending].forEach { section in
if preferred.contains(section) {
visibleSections.append(section)
}
if preferred.contains(.trending) {
visibleSections.append(.trending)
}
return !visibleSections.isEmpty
return !visibleSections.isEmpty || showHome
}
private var results: some View {