UI fix for notifications list view

This commit is contained in:
Thomas Ricouard 2023-01-18 19:11:30 +01:00
parent f968a4b652
commit fd6f337571

View File

@ -17,13 +17,10 @@ public struct NotificationsListView: View {
public var body: some View { public var body: some View {
ScrollView { ScrollView {
LazyVStack { LazyVStack {
Group {
notificationsView notificationsView
}
.padding(.top, 16)
.frame(maxWidth: .maxColumnWidth) .frame(maxWidth: .maxColumnWidth)
} }
.padding(.top, .layoutPadding) .padding(.top, .layoutPadding + 16)
.background(theme.primaryBackgroundColor) .background(theme.primaryBackgroundColor)
} }
.navigationTitle(viewModel.selectedType?.menuTitle() ?? "All Notifications") .navigationTitle(viewModel.selectedType?.menuTitle() ?? "All Notifications")
@ -78,8 +75,10 @@ public struct NotificationsListView: View {
ForEach(Models.Notification.placeholders()) { notification in ForEach(Models.Notification.placeholders()) { notification in
NotificationRowView(notification: notification) NotificationRowView(notification: notification)
.redacted(reason: .placeholder) .redacted(reason: .placeholder)
.padding(.leading, .layoutPadding + 6) .padding(.leading, .layoutPadding + 4)
.padding(.trailing, .layoutPadding) .padding(.trailing, .layoutPadding)
.padding(.top, 6)
.padding(.bottom, 2)
.shimmering() .shimmering()
Divider() Divider()
.padding(.vertical, .dividerPadding) .padding(.vertical, .dividerPadding)
@ -94,8 +93,10 @@ public struct NotificationsListView: View {
ForEach(notifications) { notification in ForEach(notifications) { notification in
if notification.supportedType != nil { if notification.supportedType != nil {
NotificationRowView(notification: notification) NotificationRowView(notification: notification)
.padding(.leading, .layoutPadding + 6) .padding(.leading, .layoutPadding + 4)
.padding(.trailing, .layoutPadding) .padding(.trailing, .layoutPadding)
.padding(.top, 6)
.padding(.bottom, 2)
Divider() Divider()
.padding(.vertical, .dividerPadding) .padding(.vertical, .dividerPadding)
} }