Add moderation-warning-notification-type (IOS-264)
This commit is contained in:
parent
a4b175ce9c
commit
a6e41c37ce
|
@ -131,7 +131,8 @@ final public class SceneCoordinator {
|
|||
from: from,
|
||||
transition: .show
|
||||
)
|
||||
|
||||
case .moderationWarning:
|
||||
break
|
||||
case ._other:
|
||||
assertionFailure()
|
||||
break
|
||||
|
|
|
@ -52,6 +52,8 @@ extension NotificationView {
|
|||
quoteStatusView.configure(status: status)
|
||||
setQuoteStatusViewDisplay()
|
||||
}
|
||||
case .moderationWarning:
|
||||
setAuthorContainerBottomPaddingViewDisplay()
|
||||
case ._other:
|
||||
setAuthorContainerBottomPaddingViewDisplay()
|
||||
assertionFailure()
|
||||
|
|
|
@ -60,6 +60,7 @@ extension APIService {
|
|||
.favourite,
|
||||
.poll,
|
||||
.status,
|
||||
.moderationWarning
|
||||
]
|
||||
case .mentions:
|
||||
return [
|
||||
|
|
|
@ -46,21 +46,10 @@ extension Mastodon.Entity.Notification {
|
|||
case favourite
|
||||
case poll
|
||||
case status
|
||||
|
||||
case moderationWarning
|
||||
|
||||
case _other(String)
|
||||
|
||||
public static var knownCases: [NotificationType] {
|
||||
return [
|
||||
.follow,
|
||||
.followRequest,
|
||||
.mention,
|
||||
.reblog,
|
||||
.favourite,
|
||||
.poll,
|
||||
.status
|
||||
]
|
||||
}
|
||||
|
||||
public init?(rawValue: String) {
|
||||
switch rawValue {
|
||||
case "follow": self = .follow
|
||||
|
@ -70,6 +59,7 @@ extension Mastodon.Entity.Notification {
|
|||
case "favourite": self = .favourite
|
||||
case "poll": self = .poll
|
||||
case "status": self = .status
|
||||
case "moderation_warning": self = .moderationWarning
|
||||
default: self = ._other(rawValue)
|
||||
}
|
||||
}
|
||||
|
@ -83,6 +73,7 @@ extension Mastodon.Entity.Notification {
|
|||
case .favourite: return "favourite"
|
||||
case .poll: return "poll"
|
||||
case .status: return "status"
|
||||
case .moderationWarning: return "moderation_warning"
|
||||
case ._other(let value): return value
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue