Fixes for iPad layout

This commit is contained in:
Thomas Ricouard 2023-01-31 08:16:36 +01:00
parent 1a351eaa7c
commit d9b166339d
6 changed files with 26 additions and 23 deletions

View file

@ -76,7 +76,6 @@ public struct AccountDetailView: View {
listsListView
}
}
.frame(maxWidth: .maxColumnWidth)
}
.scrollContentBackground(.hidden)
.background(theme.primaryBackgroundColor)

View file

@ -67,7 +67,6 @@ public struct ConversationsListView: View {
}
}
}
.frame(maxWidth: .maxColumnWidth)
}
.padding(.top, .layoutPadding)
}

View file

@ -1,7 +1,7 @@
import Foundation
public extension CGFloat {
static let layoutPadding: CGFloat = 20
static var layoutPadding: CGFloat = 20
static let dividerPadding: CGFloat = 2
static let statusColumnsSpacing: CGFloat = 8
static let maxColumnWidth: CGFloat = 650

View file

@ -14,6 +14,8 @@ public struct ErrorView: View {
}
public var body: some View {
HStack {
Spacer()
VStack {
Image(systemName: "exclamationmark.triangle.fill")
.resizable()
@ -36,5 +38,7 @@ public struct ErrorView: View {
}
.padding(.top, 100)
.padding(.layoutPadding)
Spacer()
}
}
}

View file

@ -42,6 +42,7 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
}
}
.listRowBackground(theme.primaryBackgroundColor)
.listRowSeparator(.hidden)
case let .display(statuses, nextPageState):
ForEach(statuses, id: \.viewId) { status in

View file

@ -61,7 +61,7 @@ class TimelineViewModel: ObservableObject, StatusesFetcher {
pendingStatusesObserver?.pendingStatuses = []
statusesState = .loading
statuses = try await client.get(endpoint: timeline.endpoint(sinceId: nil,
maxId: nil,
maxId: "109762933377057565",
minId: nil,
offset: statuses.count))
withAnimation {