Fix visiblity context menu in main text view accessory not updating

This commit is contained in:
Shadowfacts 2020-09-07 14:46:17 -04:00
parent 39c8162931
commit 3da7aacb35
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 1 deletions

View File

@ -139,7 +139,10 @@ struct MainComposeWrappedTextView: UIViewRepresentable {
func updateUIView(_ uiView: UITextView, context: Context) {
uiView.text = text
visibilityButton?.image = UIImage(systemName: visibility.imageName)
if let visibilityButton = visibilityButton {
visibilityButton.image = UIImage(systemName: visibility.imageName)
updateVisibilityMenu(visibilityButton)
}
context.coordinator.text = $text
context.coordinator.didChange = textDidChange
context.coordinator.uiState = uiState