forked from zelo72/mastodon-ios
fix: profile edit UX issue. ticket: #2875LSG
This commit is contained in:
parent
13a1194a59
commit
a90dac248a
|
@ -39,7 +39,7 @@ extension ProfileFieldSection {
|
|||
.sink { [weak cell] name, emojiDict in
|
||||
guard let cell = cell else { return }
|
||||
cell.fieldView.titleActiveLabel.configure(field: name, emojiDict: emojiDict)
|
||||
cell.fieldView.titleTextField.text = name
|
||||
// only bind label. The text field should only set once
|
||||
}
|
||||
.store(in: &cell.disposeBag)
|
||||
|
||||
|
@ -55,7 +55,7 @@ extension ProfileFieldSection {
|
|||
.sink { [weak cell] value, emojiDict in
|
||||
guard let cell = cell else { return }
|
||||
cell.fieldView.valueActiveLabel.configure(field: value, emojiDict: emojiDict)
|
||||
cell.fieldView.valueTextField.text = value
|
||||
// only bind label. The text field should only set once
|
||||
}
|
||||
.store(in: &cell.disposeBag)
|
||||
|
||||
|
|
|
@ -209,7 +209,12 @@ extension ProfileHeaderViewController {
|
|||
.sink { [weak self] isEditing, note, editingNote in
|
||||
guard let self = self else { return }
|
||||
self.profileHeaderView.bioActiveLabel.configure(note: note ?? "", emojiDict: [:]) // FIXME: custom emoji
|
||||
self.profileHeaderView.bioTextEditorView.text = editingNote ?? ""
|
||||
|
||||
// prevent duplicate set
|
||||
let editingNote = editingNote ?? ""
|
||||
if self.profileHeaderView.bioTextEditorView.text != editingNote {
|
||||
self.profileHeaderView.bioTextEditorView.text = editingNote
|
||||
}
|
||||
}
|
||||
.store(in: &disposeBag)
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ final class ProfileFieldView: UIView {
|
|||
let valueActiveLabel: ActiveLabel = {
|
||||
let label = ActiveLabel(style: .profileFieldValue)
|
||||
label.configure(content: "value", emojiDict: [:])
|
||||
label.textAlignment = .right
|
||||
return label
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in New Issue