fix edit profile
This commit is contained in:
parent
c7f51b30cd
commit
fa10e389cd
@ -25,6 +25,7 @@ struct EditProfileView: View {
|
||||
|
||||
private let profileService = ProfileService()
|
||||
private let descriptionLimit = 1024
|
||||
private let nameLimit = 32
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
@ -75,6 +76,11 @@ struct EditProfileView: View {
|
||||
|
||||
Section(header: Text("Публичная информация")) {
|
||||
TextField("Отображаемое имя", text: $displayName)
|
||||
.onChange(of: displayName) { newValue in
|
||||
if newValue.count > nameLimit {
|
||||
displayName = String(newValue.prefix(nameLimit))
|
||||
}
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("Описание")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user