mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Remove superheaders for all but mentions
Includes restoring the action summary text below the avatar row, but no longer shows the name of the first avatar in grouped notifications, only shows the total count. Contributes to #399 [BUG] Multiple interactions do not collapse into a single notification
This commit is contained in:
parent
332543aa3d
commit
11fa1c1a90
@ -112,13 +112,13 @@ extension GroupedNotificationType {
|
||||
if totalAuthorCount == 1 {
|
||||
switch self {
|
||||
case .favourite:
|
||||
plainString = firstAuthorName
|
||||
plainString = L10n.Scene.Notification.GroupedNotificationDescription.singleNameFavourited(firstAuthorName)
|
||||
case .follow:
|
||||
plainString = firstAuthorName
|
||||
plainString = L10n.Scene.Notification.GroupedNotificationDescription.singleNameFollowedYou(firstAuthorName)
|
||||
case .followRequest:
|
||||
plainString = firstAuthorName
|
||||
plainString = L10n.Scene.Notification.GroupedNotificationDescription.singleNameRequestedToFollowYou(firstAuthorName)
|
||||
case .reblog:
|
||||
plainString = firstAuthorName
|
||||
plainString = L10n.Scene.Notification.GroupedNotificationDescription.singleNameBoosted(firstAuthorName)
|
||||
case .mention:
|
||||
plainString = firstAuthorName
|
||||
case .poll(let status):
|
||||
@ -128,21 +128,20 @@ extension GroupedNotificationType {
|
||||
case .status:
|
||||
plainString = firstAuthorName
|
||||
case .adminSignUp:
|
||||
plainString = firstAuthorName
|
||||
plainString = L10n.Scene.Notification.GroupedNotificationDescription.singleNameSignedUp(firstAuthorName)
|
||||
default:
|
||||
plainString = firstAuthorName
|
||||
}
|
||||
} else {
|
||||
let actorsList = sourceAccounts.authorsDescription ?? firstAuthorName
|
||||
switch self {
|
||||
case .favourite:
|
||||
plainString = actorsList
|
||||
plainString = L10n.Plural.Count.peopleFavourited(totalAuthorCount)
|
||||
case .follow:
|
||||
plainString = actorsList
|
||||
plainString = L10n.Plural.Count.peopleFollowedYou(totalAuthorCount)
|
||||
case .reblog:
|
||||
plainString = actorsList
|
||||
plainString = L10n.Plural.Count.peopleBoosted(totalAuthorCount)
|
||||
default:
|
||||
plainString = actorsList
|
||||
plainString = L10n.Plural.Count.others(totalAuthorCount)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,29 +237,7 @@ class NotificationRowViewModel: ObservableObject {
|
||||
case (false, true):
|
||||
return (iconName: "at", text: L10n.Common.Controls.Status.privateMention, color: color)
|
||||
}
|
||||
case .adminReport:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.report, color: color)
|
||||
case .adminSignUp:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.signUp, color: color)
|
||||
case .favourite:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.favourite, color: color)
|
||||
case .follow:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.follow, color: color)
|
||||
case .followRequest:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.followRequest, color: color)
|
||||
case .moderationWarning:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.moderationWarning, color: .red)
|
||||
case .poll:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.poll, color: color)
|
||||
case .reblog:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.boost, color: color)
|
||||
case .severedRelationships:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.severedRelationships, color: color)
|
||||
case .status:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.status, color: color)
|
||||
case .update:
|
||||
return (iconName: nil, text: L10n.Scene.Notification.Headers.edit, color: color)
|
||||
case ._other:
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -2115,6 +2115,18 @@ public enum L10n {
|
||||
public static func others(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "plural.count.others", p1, fallback: "Plural format key: \"%#@count_others@\"")
|
||||
}
|
||||
/// Plural format key: "%#@count_people@"
|
||||
public static func peopleBoosted(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "plural.count.people_boosted", p1, fallback: "Plural format key: \"%#@count_people@\"")
|
||||
}
|
||||
/// Plural format key: "%#@count_people@"
|
||||
public static func peopleFavourited(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "plural.count.people_favourited", p1, fallback: "Plural format key: \"%#@count_people@\"")
|
||||
}
|
||||
/// Plural format key: "%#@count_people@"
|
||||
public static func peopleFollowedYou(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "plural.count.people_followed_you", p1, fallback: "Plural format key: \"%#@count_people@\"")
|
||||
}
|
||||
/// Plural format key: "%#@poll_count@"
|
||||
public static func poll(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "plural.count.poll", p1, fallback: "Plural format key: \"%#@poll_count@\"")
|
||||
|
@ -143,6 +143,66 @@
|
||||
<string>%ld others</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_boosted</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person boosted:</string>
|
||||
<key>few</key>
|
||||
<string>%ld people boosted:</string>
|
||||
<key>many</key>
|
||||
<string>%ld people boosted:</string>
|
||||
<key>other</key>
|
||||
<string>%ld people boosted:</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_favourited</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person favourited:</string>
|
||||
<key>few</key>
|
||||
<string>%ld people favourited:</string>
|
||||
<key>many</key>
|
||||
<string>%ld people favourited:</string>
|
||||
<key>other</key>
|
||||
<string>%ld people favourited:</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_followed_you</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person followed you</string>
|
||||
<key>few</key>
|
||||
<string>%ld people followed you</string>
|
||||
<key>many</key>
|
||||
<string>%ld people followed you</string>
|
||||
<key>other</key>
|
||||
<string>%ld people followed you</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.poll_that_you_and_others_voted_in</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
@ -109,6 +109,66 @@
|
||||
<string>%ld others</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_boosted</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person boosted:</string>
|
||||
<key>few</key>
|
||||
<string>%ld people boosted:</string>
|
||||
<key>many</key>
|
||||
<string>%ld people boosted:</string>
|
||||
<key>other</key>
|
||||
<string>%ld people boosted:</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_favourited</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person favourited:</string>
|
||||
<key>few</key>
|
||||
<string>%ld people favourited:</string>
|
||||
<key>many</key>
|
||||
<string>%ld people favourited:</string>
|
||||
<key>other</key>
|
||||
<string>%ld people favourited:</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.people_followed_you</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@count_people@</string>
|
||||
<key>count_people</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>one person followed you</string>
|
||||
<key>few</key>
|
||||
<string>%ld people followed you</string>
|
||||
<key>many</key>
|
||||
<string>%ld people followed you</string>
|
||||
<key>other</key>
|
||||
<string>%ld people followed you</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>plural.count.poll_that_you_and_others_voted_in</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
Loading…
x
Reference in New Issue
Block a user