iPad max column width on some screens

This commit is contained in:
Thomas Ricouard 2023-01-05 14:11:55 +01:00
parent 997d82047e
commit 770fcfd62b
4 changed files with 14 additions and 2 deletions

View file

@ -4,4 +4,5 @@ extension CGFloat {
public static let layoutPadding: CGFloat = 20 public static let layoutPadding: CGFloat = 20
public static let dividerPadding: CGFloat = 4 public static let dividerPadding: CGFloat = 4
public static let statusColumnsSpacing: CGFloat = 8 public static let statusColumnsSpacing: CGFloat = 8
public static let maxColumnWidth: CGFloat = 650
} }

View file

@ -1,13 +1,20 @@
import Foundation import Foundation
public struct Tag: Codable, Identifiable { public struct Tag: Codable, Identifiable, Equatable, Hashable {
public struct History: Codable { public struct History: Codable {
public let day: String public let day: String
public let accounts: String public let accounts: String
public let uses: String public let uses: String
} }
public func hash(into hasher: inout Hasher) {
hasher.combine(name)
}
public static func == (lhs: Tag, rhs: Tag) -> Bool {
lhs.name == rhs.name
}
public var id: String { public var id: String {
name name
} }

View file

@ -20,9 +20,11 @@ public struct NotificationsListView: View {
notificationsView notificationsView
} }
.padding(.top, 16) .padding(.top, 16)
.frame(maxWidth: .maxColumnWidth)
} }
.padding(.horizontal, .layoutPadding) .padding(.horizontal, .layoutPadding)
.padding(.top, .layoutPadding) .padding(.top, .layoutPadding)
.background(theme.primaryBackgroundColor)
} }
.navigationTitle(viewModel.selectedType?.menuTitle() ?? "All Notifications") .navigationTitle(viewModel.selectedType?.menuTitle() ?? "All Notifications")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
@ -43,6 +45,7 @@ public struct NotificationsListView: View {
} }
} }
} }
.scrollContentBackground(.hidden)
.background(theme.primaryBackgroundColor) .background(theme.primaryBackgroundColor)
.task { .task {
viewModel.client = client viewModel.client = client

View file

@ -48,6 +48,7 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
} }
} }
} }
.frame(maxWidth: .maxColumnWidth)
} }
private var loadingRow: some View { private var loadingRow: some View {