mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Fix #190
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user