diff --git a/Mastodon/In Progress New Layout and Datamodel/NotificationRowView.swift b/Mastodon/In Progress New Layout and Datamodel/NotificationRowView.swift index 56fab7572..b21c0ee8b 100644 --- a/Mastodon/In Progress New Layout and Datamodel/NotificationRowView.swift +++ b/Mastodon/In Progress New Layout and Datamodel/NotificationRowView.swift @@ -10,86 +10,6 @@ import SwiftUI // TODO: all strings need localization -extension Mastodon.Entity.NotificationType { - - - func actionSummaryLabel(firstAuthor: AuthorName, totalAuthorCount: Int) - -> AttributedString - { - // TODO: L10n strings - switch firstAuthor { - case .me: - assert(totalAuthorCount == 1) - assert(self == .poll) - return "Your poll has ended" - case .other(let firstAuthorName): - let nameComponent = boldedNameStringComponent(firstAuthorName) - var composedString: AttributedString - if totalAuthorCount == 1 { - switch self { - case .favourite: - composedString = - nameComponent + AttributedString(" favorited:") - case .follow: - composedString = - nameComponent + AttributedString(" followed you") - case .followRequest: - composedString = - nameComponent - + AttributedString(" requested to follow you") - case .reblog: - composedString = - nameComponent + AttributedString(" boosted:") - case .mention: - composedString = - nameComponent + AttributedString(" mentioned you:") - case .poll: - composedString = - nameComponent - + AttributedString(" ran a poll that you voted in") // TODO: add count of how many others voted - case .status: - composedString = - nameComponent + AttributedString(" posted:") - case .adminSignUp: - composedString = - nameComponent + AttributedString(" signed up") - default: - composedString = - nameComponent + AttributedString("did something?") - } - } else { - switch self { - case .favourite: - composedString = - nameComponent - + AttributedString( - " and \(totalAuthorCount - 1) others favorited:") - case .follow: - composedString = - nameComponent - + AttributedString( - " and \(totalAuthorCount - 1) others followed you") - case .reblog: - composedString = - nameComponent - + AttributedString( - " and \(totalAuthorCount - 1) others boosted:") - default: - composedString = - nameComponent - + AttributedString( - " and \(totalAuthorCount - 1) others did something") - } - } - let nameStyling = AttributeContainer.font( - .system(.body, weight: .bold)) - let nameContainer = AttributeContainer.personNameComponent( - .givenName) - composedString.replaceAttributes(nameContainer, with: nameStyling) - return composedString - } - } -} enum AuthorName { case me