Follow request notification type
This commit is contained in:
parent
4fbda99bb6
commit
741545fc1f
|
@ -141,6 +141,7 @@
|
|||
"preferences.notification-types" = "Notification Types";
|
||||
"preferences.notification-types.follow" = "Follow";
|
||||
"preferences.notification-types.favourite" = "Favorite";
|
||||
"preferences.notification-types.follow-request" = "Follow Request";
|
||||
"preferences.notification-types.reblog" = "Reblog";
|
||||
"preferences.notification-types.mention" = "Mention";
|
||||
"preferences.notification-types.poll" = "Poll";
|
||||
|
|
|
@ -8,6 +8,7 @@ public struct PushSubscription: Codable {
|
|||
public var favourite: Bool
|
||||
public var reblog: Bool
|
||||
public var mention: Bool
|
||||
@DecodableDefault.True public var followRequest: Bool
|
||||
@DecodableDefault.True public var poll: Bool
|
||||
@DecodableDefault.True public var status: Bool
|
||||
}
|
||||
|
@ -23,6 +24,7 @@ public extension PushSubscription.Alerts {
|
|||
favourite: true,
|
||||
reblog: true,
|
||||
mention: true,
|
||||
followRequest: DecodableDefault.True(),
|
||||
poll: DecodableDefault.True(),
|
||||
status: DecodableDefault.True())
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ extension PushSubscriptionEndpoint: Endpoint {
|
|||
"favourite": alerts.favourite,
|
||||
"reblog": alerts.reblog,
|
||||
"mention": alerts.mention,
|
||||
"follow_request": alerts.followRequest,
|
||||
"poll": alerts.poll,
|
||||
"status": alerts.status
|
||||
]]]
|
||||
|
@ -57,6 +58,7 @@ extension PushSubscriptionEndpoint: Endpoint {
|
|||
"favourite": alerts.favourite,
|
||||
"reblog": alerts.reblog,
|
||||
"mention": alerts.mention,
|
||||
"follow_request": alerts.followRequest,
|
||||
"poll": alerts.poll,
|
||||
"status": alerts.status]]]
|
||||
default: return nil
|
||||
|
|
|
@ -16,6 +16,8 @@ struct NotificationTypesPreferencesView: View {
|
|||
isOn: $viewModel.pushSubscriptionAlerts.reblog)
|
||||
Toggle("preferences.notification-types.mention",
|
||||
isOn: $viewModel.pushSubscriptionAlerts.mention)
|
||||
Toggle("preferences.notification-types.follow-request",
|
||||
isOn: $viewModel.pushSubscriptionAlerts.followRequest)
|
||||
Toggle("preferences.notification-types.poll",
|
||||
isOn: $viewModel.pushSubscriptionAlerts.poll)
|
||||
Toggle("preferences.notification-types.status",
|
||||
|
|
Loading…
Reference in New Issue