Skip to content

Commit a973449

Browse files
committed
Swap method names to match their functionality
1 parent 53fcfd9 commit a973449

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/toolbar/AztecToolbar.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class AztecToolbar : FrameLayout, IAztecToolbar, OnMenuItemClickListener {
572572
}
573573
}
574574

575-
private fun syncEditorFromSource() {
575+
private fun syncSourceFromEditor() {
576576
val editorHtml = editor!!.toPlainHtml(true)
577577
val sha256 = AztecText.calculateSHA256(editorHtml)
578578
if (editor!!.hasChanges() != NO_CHANGES || !Arrays.equals(editorContentParsedSHA256LastSwitch, sha256)) {
@@ -581,7 +581,7 @@ class AztecToolbar : FrameLayout, IAztecToolbar, OnMenuItemClickListener {
581581
editorContentParsedSHA256LastSwitch = sha256
582582
}
583583

584-
private fun syncSourceFromEditor() {
584+
private fun syncEditorFromSource() {
585585
// temp var of the source html to load it to the editor if needed
586586
val sourceHtml = sourceEditor!!.getPureHtml(true)
587587
val sha256 = AztecText.calculateSHA256(sourceHtml)
@@ -596,13 +596,13 @@ class AztecToolbar : FrameLayout, IAztecToolbar, OnMenuItemClickListener {
596596
if (sourceEditor == null) return
597597

598598
if (editor!!.visibility == View.VISIBLE) {
599-
syncEditorFromSource()
599+
syncSourceFromEditor()
600600
editor!!.visibility = View.GONE
601601
sourceEditor!!.visibility = View.VISIBLE
602602

603603
toggleHtmlMode(true)
604604
} else {
605-
syncSourceFromEditor()
605+
syncEditorFromSource()
606606
editor!!.visibility = View.VISIBLE
607607
sourceEditor!!.visibility = View.GONE
608608

0 commit comments

Comments
 (0)