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