Fix account selector on iPad

This commit is contained in:
Thomas Ricouard 2023-01-16 22:01:04 +01:00
parent 451cc7a4ac
commit c21272f641
6 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ struct SideBarView<Content: View>: View {
accountCreationEnabled: false,
avatarSize: .status)
}
.frame(width: 70, height: 60)
.frame(width: 80, height: 60)
.background(selectedTab == .profile ? theme.secondaryBackgroundColor : .clear)
ForEach(tabs) { tab in
Button {
@ -41,12 +41,12 @@ struct SideBarView<Content: View>: View {
.frame(width: 24, height: 24)
.foregroundColor(tab == selectedTab ? theme.tintColor : .gray)
}
.frame(width: 70, height: 50)
.frame(width: 80, height: 50)
.background(tab == selectedTab ? theme.secondaryBackgroundColor : .clear)
}
Spacer()
}
.frame(width: 70)
.frame(width: 80)
.background(.clear)
Divider()
.edgesIgnoringSafeArea(.top)

View File

@ -22,7 +22,7 @@ struct ExploreTab: View {
.toolbar {
statusEditorToolbarItem(routeurPath: routeurPath,
visibility: preferences.serverPreferences?.postVisibility ?? .pub)
if !ProcessInfo.processInfo.isiOSAppOnMac {
if UIDevice.current.userInterfaceIdiom != .pad {
ToolbarItem(placement: .navigationBarLeading) {
AppAccountsSelectorView(routeurPath: routeurPath)
}

View File

@ -21,7 +21,7 @@ struct MessagesTab: View {
.withAppRouteur()
.withSheetDestinations(sheetDestinations: $routeurPath.presentedSheet)
.toolbar {
if !ProcessInfo.processInfo.isiOSAppOnMac {
if UIDevice.current.userInterfaceIdiom != .pad {
ToolbarItem(placement: .navigationBarLeading) {
AppAccountsSelectorView(routeurPath: routeurPath)
}

View File

@ -21,7 +21,7 @@ struct NotificationsTab: View {
.toolbar {
statusEditorToolbarItem(routeurPath: routeurPath,
visibility: userPreferences.serverPreferences?.postVisibility ?? .pub)
if !ProcessInfo.processInfo.isiOSAppOnMac {
if UIDevice.current.userInterfaceIdiom != .pad {
ToolbarItem(placement: .navigationBarLeading) {
AppAccountsSelectorView(routeurPath: routeurPath)
}

View File

@ -138,7 +138,7 @@ struct TimelineTab: View {
}
}
if client.isAuth {
if !ProcessInfo.processInfo.isiOSAppOnMac {
if UIDevice.current.userInterfaceIdiom != .pad {
ToolbarItem(placement: .navigationBarLeading) {
AppAccountsSelectorView(routeurPath: routeurPath)
}

View File

@ -23,7 +23,7 @@ public struct AppAccountsSelectorView: View {
public var body: some View {
Group {
if ProcessInfo.processInfo.isiOSAppOnMac {
if UIDevice.current.userInterfaceIdiom == .pad {
labelView
.contextMenu {
menuView