File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/toolbar Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ class AztecToolbar : FrameLayout, OnMenuItemClickListener {
258258 editor!! .visibility = View .GONE
259259 sourceEditor!! .visibility = View .VISIBLE
260260
261- toggleHtmlMode( true )
261+ enableFormatToolbar( false )
262262 } else {
263263 toggleButton(findViewById(ToolbarAction .HTML .buttonId), false )
264264 showMediaUploadDialog()
@@ -268,7 +268,7 @@ class AztecToolbar : FrameLayout, OnMenuItemClickListener {
268268 editor!! .visibility = View .VISIBLE
269269 sourceEditor!! .visibility = View .GONE
270270
271- toggleHtmlMode( false )
271+ enableFormatToolbar( true )
272272 }
273273 }
274274
@@ -312,12 +312,12 @@ class AztecToolbar : FrameLayout, OnMenuItemClickListener {
312312 return null
313313 }
314314
315- fun toggleHtmlMode ( isHtmlMode : Boolean ) {
315+ fun enableFormatToolbar ( isEnabled : Boolean ) {
316316 ToolbarAction .values().forEach { action ->
317317 if (action == ToolbarAction .HTML ) {
318- toggleButton(findViewById(action.buttonId), isHtmlMode )
318+ toggleButton(findViewById(action.buttonId), ! isEnabled )
319319 } else {
320- toggleButtonState(findViewById(action.buttonId), ! isHtmlMode )
320+ toggleButtonState(findViewById(action.buttonId), isEnabled )
321321 }
322322 }
323323 }
You can’t perform that action at this time.
0 commit comments