fix privacy settings
This commit is contained in:
parent
997ddea9c4
commit
b1d9112806
@ -434,7 +434,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = yobble/yobble.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 11;
|
||||
DEVELOPMENT_TEAM = V22H44W47J;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@ -475,7 +475,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = yobble/yobble.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 11;
|
||||
DEVELOPMENT_TEAM = V22H44W47J;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
||||
@ -70,35 +70,27 @@ struct EditPrivacyView: View {
|
||||
Toggle(NSLocalizedString("Показывать био не-контактам", comment: ""), isOn: $profilePermissions.showBioToNonContacts)
|
||||
Toggle(NSLocalizedString("Показывать сторисы не-контактам", comment: ""), isOn: $profilePermissions.showStoriesToNonContacts)
|
||||
|
||||
Picker(NSLocalizedString("Видимость статуса 'был в сети'", comment: ""), selection: $profilePermissions.lastSeenVisibility) {
|
||||
ForEach(privacyScopeOptions) { scope in
|
||||
Text(scope.title).tag(scope.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
privacyScopePicker(
|
||||
title: NSLocalizedString("Видимость статуса 'был в сети'", comment: ""),
|
||||
selection: $profilePermissions.lastSeenVisibility
|
||||
)
|
||||
}
|
||||
|
||||
Section(header: Text(NSLocalizedString("Приглашения и звонки", comment: ""))) {
|
||||
Picker(NSLocalizedString("Кто может приглашать в паблики", comment: ""), selection: $profilePermissions.publicInvitePermission) {
|
||||
ForEach(privacyScopeOptions) { scope in
|
||||
Text(scope.title).tag(scope.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
privacyScopePicker(
|
||||
title: NSLocalizedString("Кто может приглашать в паблики", comment: ""),
|
||||
selection: $profilePermissions.publicInvitePermission
|
||||
)
|
||||
|
||||
Picker(NSLocalizedString("Кто может приглашать в беседы", comment: ""), selection: $profilePermissions.groupInvitePermission) {
|
||||
ForEach(privacyScopeOptions) { scope in
|
||||
Text(scope.title).tag(scope.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
privacyScopePicker(
|
||||
title: NSLocalizedString("Кто может приглашать в беседы", comment: ""),
|
||||
selection: $profilePermissions.groupInvitePermission
|
||||
)
|
||||
|
||||
Picker(NSLocalizedString("Кто может звонить", comment: ""), selection: $profilePermissions.callPermission) {
|
||||
ForEach(privacyScopeOptions) { scope in
|
||||
Text(scope.title).tag(scope.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
privacyScopePicker(
|
||||
title: NSLocalizedString("Кто может звонить", comment: ""),
|
||||
selection: $profilePermissions.callPermission
|
||||
)
|
||||
}
|
||||
|
||||
Section(header: Text(NSLocalizedString("Чаты и хранение", comment: ""))) {
|
||||
@ -192,6 +184,24 @@ struct EditPrivacyView: View {
|
||||
return "\(secondsString) (≈ \(formattedHours) ч.)"
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func privacyScopePicker(title: String, selection: Binding<Int>) -> some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text(title)
|
||||
.font(.body)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
Picker("", selection: selection) {
|
||||
ForEach(privacyScopeOptions) { scope in
|
||||
Text(scope.title).tag(scope.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
}
|
||||
|
||||
private enum PrivacyScope: Int, CaseIterable, Identifiable {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user