mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-09-02 08:03:47 +00:00
Sidebar fixes
This commit is contained in:
parent
469b99f3c9
commit
60ade66251
2 changed files with 20 additions and 18 deletions
|
@ -105,6 +105,7 @@ struct SideBarView<Content: View>: View {
|
||||||
|
|
||||||
private var tabsView: some View {
|
private var tabsView: some View {
|
||||||
ForEach(tabs) { tab in
|
ForEach(tabs) { tab in
|
||||||
|
if tab != .profile {
|
||||||
Button {
|
Button {
|
||||||
// ensure keyboard is always dismissed when selecting a tab
|
// ensure keyboard is always dismissed when selecting a tab
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
|
@ -129,6 +130,7 @@ struct SideBarView<Content: View>: View {
|
||||||
.background(tab == selectedTab ? theme.secondaryBackgroundColor : .clear)
|
.background(tab == selectedTab ? theme.secondaryBackgroundColor : .clear)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@Bindable var routerPath = routerPath
|
@Bindable var routerPath = routerPath
|
||||||
|
|
|
@ -24,7 +24,7 @@ enum Tab: Int, Identifiable, Hashable, CaseIterable {
|
||||||
static func loggedInTabs() -> [Tab] {
|
static func loggedInTabs() -> [Tab] {
|
||||||
if UIDevice.current.userInterfaceIdiom == .pad ||
|
if UIDevice.current.userInterfaceIdiom == .pad ||
|
||||||
UIDevice.current.userInterfaceIdiom == .mac {
|
UIDevice.current.userInterfaceIdiom == .mac {
|
||||||
[.timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .bookmarks, .favorites, .settings]
|
[.timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .bookmarks, .favorites, .profile, .settings]
|
||||||
} else if UIDevice.current.userInterfaceIdiom == .vision {
|
} else if UIDevice.current.userInterfaceIdiom == .vision {
|
||||||
[.profile, .timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .settings]
|
[.profile, .timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .settings]
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue