mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-27 00:08:09 +00:00
Better TabView support
This commit is contained in:
parent
30c5c36aa1
commit
24c7d5be61
1 changed files with 11 additions and 11 deletions
|
@ -59,18 +59,18 @@ struct AppView: View {
|
|||
updateTab(with: newTab)
|
||||
})) {
|
||||
ForEach(availableTabs) { tab in
|
||||
Tab(value: tab) {
|
||||
tab.makeContentView(selectedTab: $selectedTab)
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .tabBar)
|
||||
} label: {
|
||||
if userPreferences.showiPhoneTabLabel {
|
||||
tab.label
|
||||
.environment(\.symbolVariants, tab == selectedTab ? .fill : .none)
|
||||
} else {
|
||||
Image(systemName: tab.iconName)
|
||||
tab.makeContentView(selectedTab: $selectedTab)
|
||||
.tabItem {
|
||||
if userPreferences.showiPhoneTabLabel {
|
||||
tab.label
|
||||
.environment(\.symbolVariants, tab == selectedTab ? .fill : .none)
|
||||
} else {
|
||||
Image(systemName: tab.iconName)
|
||||
}
|
||||
}
|
||||
}
|
||||
.badge(badgeFor(tab: tab))
|
||||
.tag(tab)
|
||||
.badge(badgeFor(tab: tab))
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .tabBar)
|
||||
}
|
||||
}
|
||||
.id(appAccountsManager.currentClient.id)
|
||||
|
|
Loading…
Reference in a new issue