Skip to content

Commit 29638ec

Browse files
committed
Reverted some test changes.
1 parent b3df379 commit 29638ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
19001900
val html = Format.removeSourceEditorFormatting(parser.toHtml(output), isInCalypsoMode, isInGutenbergMode)
19011901

19021902
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager
1903-
clipboard.setPrimaryClip(ClipData.newHtmlText("aztec", output.toString(), html))
1903+
clipboard.primaryClip = ClipData.newHtmlText("aztec", output.toString(), html)
19041904
}
19051905

19061906
// copied from TextView with some changes
@@ -1961,14 +1961,14 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
19611961
}
19621962
if (itemToPaste != null) {
19631963
val oldHtml = toPlainHtml().replace("<aztec_cursor>", "")
1964-
val pastedHtmlText: String = (plugins.filterIsInstance<IClipboardPastePlugin<*>>()
1964+
val pastedHtmlText: String = plugins.filterIsInstance<IClipboardPastePlugin<*>>()
19651965
.fold(null as? String?) { acc, plugin ->
19661966
plugin.itemToHtml(itemToPaste, acc ?: selectedText?.takeIf { it.isNotBlank() }) ?: acc
19671967
} ?: when (itemToPaste) {
19681968
is IClipboardPastePlugin.PastedItem.HtmlText -> itemToPaste.text
19691969
is IClipboardPastePlugin.PastedItem.Url -> itemToPaste.uri.path
19701970
is IClipboardPastePlugin.PastedItem.PastedIntent -> itemToPaste.intent.toString()
1971-
})!!
1971+
}
19721972

19731973
val newHtml = oldHtml.replace(
19741974
Constants.REPLACEMENT_MARKER_STRING,
@@ -2118,7 +2118,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
21182118

21192119
unknownBlockSpanStart = text.getSpanStart(unknownHtmlSpan)
21202120
blockEditorDialog = builder.create()
2121-
// blockEditorDialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
2121+
blockEditorDialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
21222122
blockEditorDialog?.show()
21232123
}
21242124

0 commit comments

Comments
 (0)