From 2a31fd7ef59586ec4f08ccef45afff2fed61f4ee Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sat, 21 Jan 2023 15:16:52 +0100 Subject: [PATCH] Make notifications more compact --- .../Sources/Notifications/NotificationRowView.swift | 11 +++++++++++ .../Sources/Notifications/NotificationTypeExt.swift | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift index 2d6a6e6a..044da9a7 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift @@ -69,6 +69,16 @@ struct NotificationRowView: View { }) .font(.scaledSubheadline) .fontWeight(.semibold) + .lineLimit(1) + if let status = notification.status, notification.supportedType == .mention { + Group { + Text(" βΈ± ") + Text(Image(systemName: status.visibility.iconName)) + } + .font(.scaledFootnote) + .fontWeight(.regular) + .foregroundColor(.gray) + } Spacer() } } @@ -86,6 +96,7 @@ struct NotificationRowView: View { StatusRowView(viewModel: .init(status: status, isCompact: true, showActions: true)) } else { StatusRowView(viewModel: .init(status: status, isCompact: true, showActions: false)) + .lineLimit(4) .foregroundColor(.gray) } Spacer() diff --git a/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift b/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift index 2273e861..42a45c88 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift @@ -7,7 +7,7 @@ extension Models.Notification.NotificationType { case .status: return "notifications.label.status" case .mention: - return "notifications.label.mention" + return "" case .reblog: return "notifications.label.reblog" case .follow: