From 9a8568d3fad60038a350e91658831d104e730bca Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 22 Jan 2024 09:05:22 +0100 Subject: [PATCH] Fix notifications layout --- .../Sources/Notifications/NotificationRowView.swift | 2 +- .../Sources/Notifications/NotificationsListView.swift | 4 ++-- Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift index 0645761a..c884cf1f 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift @@ -27,7 +27,7 @@ struct NotificationRowView: View { height: AvatarView.FrameConfig.status.height) .accessibilityHidden(true) } - VStack(alignment: .leading, spacing: 2) { + VStack(alignment: .leading, spacing: 0) { makeMainLabel(type: notification.type) // The main label is redundant for mentions .accessibilityHidden(notification.type == .mention) diff --git a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift index b1e98b39..2ba12b50 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift @@ -139,7 +139,7 @@ public struct NotificationsListView: View { followRequests: account.followRequests) .listRowInsets(.init(top: 12, leading: .layoutPadding + 4, - bottom: 12, + bottom: 0, trailing: .layoutPadding)) #if os(visionOS) .listRowBackground(RoundedRectangle(cornerRadius: 8) @@ -168,7 +168,7 @@ public struct NotificationsListView: View { followRequests: account.followRequests) .listRowInsets(.init(top: 12, leading: .layoutPadding + 4, - bottom: 12, + bottom: 6, trailing: .layoutPadding)) #if os(visionOS) .listRowBackground(RoundedRectangle(cornerRadius: 8) diff --git a/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift b/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift index 51a1eff5..4abec5d5 100644 --- a/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift @@ -107,7 +107,7 @@ public struct StatusRowView: View { } } } - .padding(.init(top: 12, leading: 0, bottom: isFocused ? 12 : 6, trailing: 0)) + .padding(.init(top: isCompact ? 6 : 12, leading: 0, bottom: isFocused ? 12 : 6, trailing: 0)) } .onAppear { if !reasons.contains(.placeholder) {