From 3da7aacb356b3716641c7d974639345cff14736f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 7 Sep 2020 14:46:17 -0400 Subject: [PATCH] Fix visiblity context menu in main text view accessory not updating --- Tusker/Screens/Compose/MainComposeTextView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Compose/MainComposeTextView.swift b/Tusker/Screens/Compose/MainComposeTextView.swift index 713d7fbf0e..d17b65d9d3 100644 --- a/Tusker/Screens/Compose/MainComposeTextView.swift +++ b/Tusker/Screens/Compose/MainComposeTextView.swift @@ -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