mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
iPad hotfix: Disable tabbar slideover
This commit is contained in:
parent
0e9a006483
commit
e733dc3f2a
1 changed files with 3 additions and 5 deletions
|
@ -18,8 +18,7 @@ struct AppView: View {
|
||||||
@Environment(Theme.self) private var theme
|
@Environment(Theme.self) private var theme
|
||||||
@Environment(StreamWatcher.self) private var watcher
|
@Environment(StreamWatcher.self) private var watcher
|
||||||
|
|
||||||
@Environment(\.horizontalSizeClass) var horizontalSizeClass
|
|
||||||
|
|
||||||
@Binding var selectedTab: Tab
|
@Binding var selectedTab: Tab
|
||||||
@Binding var sidebarRouterPath: RouterPath
|
@Binding var sidebarRouterPath: RouterPath
|
||||||
|
|
||||||
|
@ -28,8 +27,7 @@ struct AppView: View {
|
||||||
@State var sideBarLoadedTabs: Set<Tab> = Set()
|
@State var sideBarLoadedTabs: Set<Tab> = Set()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if (UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac) &&
|
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||||
horizontalSizeClass == .regular {
|
|
||||||
sidebarView
|
sidebarView
|
||||||
} else {
|
} else {
|
||||||
tabBarView
|
tabBarView
|
||||||
|
@ -37,7 +35,7 @@ struct AppView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
var availableTabs: [Tab] {
|
var availableTabs: [Tab] {
|
||||||
if UIDevice.current.userInterfaceIdiom == .phone || horizontalSizeClass == .compact {
|
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||||
return appAccountsManager.currentClient.isAuth ? iosTabs.tabs : Tab.loggedOutTab()
|
return appAccountsManager.currentClient.isAuth ? iosTabs.tabs : Tab.loggedOutTab()
|
||||||
}
|
}
|
||||||
return appAccountsManager.currentClient.isAuth ? Tab.loggedInTabs() : Tab.loggedOutTab()
|
return appAccountsManager.currentClient.isAuth ? Tab.loggedInTabs() : Tab.loggedOutTab()
|
||||||
|
|
Loading…
Reference in a new issue