Merge branch 'hotfix-sidebar'

This commit is contained in:
Thomas Ricouard 2024-09-11 10:03:32 +02:00
commit 896c031ab0
2 changed files with 5 additions and 8 deletions

View file

@ -110,10 +110,7 @@ struct AppView: View {
HStack(spacing: 0) {
if #available(iOS 18.0, *) {
baseTabView
.tabViewStyle(.sidebarAdaptable)
.introspect(.tabView, on: .iOS(.v17, .v18)) { (tabview: UITabBarController) in
tabview.sidebar.isHidden = true
}
.tabViewStyle(.tabBarOnly)
} else {
baseTabView
}

View file

@ -34,8 +34,8 @@ struct SideBarView<Content: View>: View {
}
private func makeIconForTab(tab: AppTab) -> some View {
HStack {
ZStack(alignment: .topTrailing) {
ZStack(alignment: .topTrailing) {
HStack {
SideBarIcon(systemIconName: tab.iconName,
isSelected: tab == selectedTab)
if userPreferences.isSidebarExpanded {
@ -56,7 +56,7 @@ struct SideBarView<Content: View>: View {
)
let badge = badgeFor(tab: tab)
if badge > 0 {
makeBadgeView(count: 10)
makeBadgeView(count: badge)
}
}
}
@ -70,7 +70,7 @@ struct SideBarView<Content: View>: View {
.font(.caption2)
}
.frame(width: 24, height: 24)
.offset(x: 10, y: -10)
.offset(x: 5, y: -5)
}
private var postButton: some View {