group slider and text of "max reply indentation" setting (#1749)

This commit is contained in:
sh95014 2023-12-16 22:33:55 -08:00 committed by GitHub
parent 0d37cdf64b
commit 038d029022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,13 +207,15 @@ struct DisplaySettingsView: View {
Toggle("settings.display.pending-left", isOn: $userPreferences.pendingShownLeft)
Toggle("settings.display.show-reply-indentation", isOn: $userPreferences.showReplyIndentation)
if userPreferences.showReplyIndentation {
Slider(value: .init(get: {
Double(userPreferences.maxReplyIndentation)
}, set: { newVal in
userPreferences.maxReplyIndentation = UInt(newVal)
}), in: 1...20, step: 1)
Text("settings.display.max-reply-indentation-\(String(userPreferences.maxReplyIndentation))")
.font(.scaledBody)
VStack {
Slider(value: .init(get: {
Double(userPreferences.maxReplyIndentation)
}, set: { newVal in
userPreferences.maxReplyIndentation = UInt(newVal)
}), in: 1...20, step: 1)
Text("settings.display.max-reply-indentation-\(String(userPreferences.maxReplyIndentation))")
.font(.scaledBody)
}
}
}
.listRowBackground(theme.primaryBackgroundColor)