diff --git a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift index 74668ab7..441573b1 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationRowView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationRowView.swift @@ -58,7 +58,7 @@ struct NotificationRowView: View { .background(Circle().foregroundColor(type.tintColor(isPrivate: notification.status?.visibility == .direct))) .frame(width: 24, height: 24) - Image(systemName: type.iconName(isPrivate: notification.status?.visibility == .direct)) + type.icon(isPrivate: notification.status?.visibility == .direct) .resizable() .scaledToFit() .frame(width: 12, height: 12) diff --git a/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift b/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift index 7f970257..ed5143f6 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationTypeExt.swift @@ -45,25 +45,25 @@ extension Models.Notification.NotificationType { } } - func iconName(isPrivate: Bool) -> String { + func icon(isPrivate: Bool) -> Image { if isPrivate { - return "tray.fill" + return Image(systemName:"tray.fill") } switch self { case .status: - return "pencil" + return Image(systemName:"pencil") case .mention: - return "at" + return Image(systemName:"at") case .reblog: - return "Rocket.Fill" + return Image("Rocket.Fill") case .follow, .follow_request: - return "person.fill.badge.plus" + return Image(systemName:"person.fill.badge.plus") case .favourite: - return "star.fill" + return Image(systemName:"star.fill") case .poll: - return "chart.bar.fill" + return Image(systemName:"chart.bar.fill") case .update: - return "pencil.line" + return Image(systemName:"pencil.line") } } diff --git a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift index 30d9c1c5..3ba53aa4 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift @@ -43,7 +43,11 @@ public struct NotificationsListView: View { Button { viewModel.selectedType = type } label: { - Label(type.menuTitle(), systemImage: type.iconName(isPrivate: false)) + Label { + Text(type.menuTitle()) + } icon: { + type.icon(isPrivate: false) + } } } }