This commit is contained in:
Arkadiusz Fal
2022-06-30 10:05:32 +02:00
parent 3cbbf8446b
commit e477d90620
10 changed files with 58 additions and 25 deletions

View File

@@ -87,7 +87,8 @@ struct ContentView: View {
navigation: navigation,
recents: recents,
player: player,
search: search
search: search,
navigationStyle: navigationStyle
).handle($0)
}
.background(
@@ -115,6 +116,16 @@ struct ContentView: View {
.alert(isPresented: $navigation.presentingAlert) { navigation.alert }
}
var navigationStyle: NavigationStyle {
#if os(iOS)
return horizontalSizeClass == .compact ? .tab : .sidebar
#elseif os(tvOS)
return .tab
#else
return .sidebar
#endif
}
func openWelcomeScreenIfAccountEmpty() {
guard Defaults[.instances].isEmpty else {
return