Use only tab navigation on iPhone

This commit is contained in:
Arkadiusz Fal 2023-02-25 16:42:45 +01:00
parent 0c7af0351b
commit ef401168ec
2 changed files with 14 additions and 2 deletions

View File

@ -5,6 +5,14 @@ import SwiftUI
struct Constants {
static let yatteeProtocol = "yattee://"
static let overlayAnimation = Animation.linear(duration: 0.2)
static var isIPhone: Bool {
#if os(iOS)
UIDevice.current.userInterfaceIdiom == .phone
#else
false
#endif
}
static var progressViewScale: Double {
#if os(macOS)
0.4

View File

@ -25,11 +25,15 @@ struct ContentView: View {
var body: some View {
Group {
#if os(iOS)
if Constants.isIPhone {
AppTabNavigation()
} else {
if horizontalSizeClass == .compact {
AppTabNavigation()
} else {
AppSidebarNavigation()
}
}
#elseif os(macOS)
AppSidebarNavigation()
#elseif os(tvOS)