mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +00:00
Tweak to notifications policy
This commit is contained in:
parent
412f475d1d
commit
dc85557d40
1 changed files with 21 additions and 29 deletions
|
@ -25,12 +25,8 @@ struct NotificationsPolicyView: View {
|
||||||
})) {
|
})) {
|
||||||
pickerMenu
|
pickerMenu
|
||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
makePickerLabel(title: "notifications.content-filter.peopleYouDontFollow",
|
||||||
Text("notifications.content-filter.peopleYouDontFollow")
|
subtitle: "Until you manually approve them")
|
||||||
Text("Until you manually approve them")
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Picker(selection: .init(get: {
|
Picker(selection: .init(get: {
|
||||||
|
@ -41,12 +37,8 @@ struct NotificationsPolicyView: View {
|
||||||
})) {
|
})) {
|
||||||
pickerMenu
|
pickerMenu
|
||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
makePickerLabel(title: "notifications.content-filter.peopleNotFollowingYou",
|
||||||
Text("notifications.content-filter.peopleNotFollowingYou")
|
subtitle: "And following you for less than 3 days")
|
||||||
Text("And following you for less than 3 days")
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Picker(selection: .init(get: {
|
Picker(selection: .init(get: {
|
||||||
|
@ -57,12 +49,8 @@ struct NotificationsPolicyView: View {
|
||||||
})) {
|
})) {
|
||||||
pickerMenu
|
pickerMenu
|
||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
makePickerLabel(title: "notifications.content-filter.newAccounts",
|
||||||
Text("notifications.content-filter.newAccounts")
|
subtitle: "Created within the past 30 days")
|
||||||
Text("Created within the past 30 days")
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Picker(selection: .init(get: {
|
Picker(selection: .init(get: {
|
||||||
|
@ -73,12 +61,8 @@ struct NotificationsPolicyView: View {
|
||||||
})) {
|
})) {
|
||||||
pickerMenu
|
pickerMenu
|
||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
makePickerLabel(title: "notifications.content-filter.privateMentions",
|
||||||
Text("notifications.content-filter.privateMentions")
|
subtitle: "Unless it's in reply to your own mention or if you follow the sender")
|
||||||
Text("Unless it's in reply to your own mention or if you follow the sender")
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Picker(selection: .init(get: {
|
Picker(selection: .init(get: {
|
||||||
|
@ -90,10 +74,8 @@ struct NotificationsPolicyView: View {
|
||||||
pickerMenu
|
pickerMenu
|
||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("Moderated accounts")
|
makePickerLabel(title: "Moderated accounts",
|
||||||
Text("Limited by server moderators")
|
subtitle: "Limited by server moderators")
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +94,7 @@ struct NotificationsPolicyView: View {
|
||||||
}
|
}
|
||||||
.redacted(reason: policy == nil ? .placeholder : [])
|
.redacted(reason: policy == nil ? .placeholder : [])
|
||||||
}
|
}
|
||||||
.presentationDetents([.medium])
|
.presentationDetents([.height(500)])
|
||||||
.presentationBackground(.thinMaterial)
|
.presentationBackground(.thinMaterial)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +104,16 @@ struct NotificationsPolicyView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func makePickerLabel(title: LocalizedStringKey, subtitle: LocalizedStringKey) -> some View {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Text(title)
|
||||||
|
.font(.callout)
|
||||||
|
Text(subtitle)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.font(.footnote)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func getPolicy() async {
|
private func getPolicy() async {
|
||||||
defer {
|
defer {
|
||||||
isUpdating = false
|
isUpdating = false
|
||||||
|
|
Loading…
Reference in a new issue