Skip to content

Commit 4a2ce6f

Browse files
committed
Remove redundant generics type specification
1 parent 9d25e1f commit 4a2ce6f

File tree

1 file changed

+4
-4
lines changed
  • wordpress-shortcodes/src/main/java/org/wordpress/aztec/plugins/shortcodes/extensions

1 file changed

+4
-4
lines changed

wordpress-shortcodes/src/main/java/org/wordpress/aztec/plugins/shortcodes/extensions/CaptionExtensions.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fun AztecText.hasImageCaption(attributePredicate: AztecText.AttributePredicate):
5757

5858
fun AztecImageSpan.getCaption(): String {
5959
textView?.text?.let {
60-
val wrapper = SpanWrapper<AztecImageSpan>(textView!!.text, this)
60+
val wrapper = SpanWrapper(textView!!.text, this)
6161
textView!!.text.getSpans(wrapper.start, wrapper.end, CaptionShortcodeSpan::class.java).firstOrNull()?.let {
6262
return it.caption
6363
}
@@ -67,7 +67,7 @@ fun AztecImageSpan.getCaption(): String {
6767

6868
fun AztecImageSpan.getCaptionAttributes(): AztecAttributes {
6969
textView?.text?.let {
70-
val wrapper = SpanWrapper<AztecImageSpan>(textView!!.text, this)
70+
val wrapper = SpanWrapper(textView!!.text, this)
7171
textView!!.text.getSpans(wrapper.start, wrapper.end, CaptionShortcodeSpan::class.java).firstOrNull()?.let {
7272
return it.attributes
7373
}
@@ -78,7 +78,7 @@ fun AztecImageSpan.getCaptionAttributes(): AztecAttributes {
7878
@JvmOverloads
7979
fun AztecImageSpan.setCaption(value: String, attrs: AztecAttributes? = null) {
8080
textView?.text?.let {
81-
val wrapper = SpanWrapper<AztecImageSpan>(textView!!.text, this)
81+
val wrapper = SpanWrapper(textView!!.text, this)
8282

8383
var captionSpan = textView?.text?.getSpans(wrapper.start, wrapper.end, CaptionShortcodeSpan::class.java)?.firstOrNull()
8484
if (captionSpan == null) {
@@ -106,7 +106,7 @@ fun AztecImageSpan.setCaption(value: String, attrs: AztecAttributes? = null) {
106106

107107
fun AztecImageSpan.removeCaption() {
108108
textView?.text?.let {
109-
val wrapper = SpanWrapper<AztecImageSpan>(textView!!.text, this)
109+
val wrapper = SpanWrapper(textView!!.text, this)
110110
textView!!.text.getSpans(wrapper.start, wrapper.end, CaptionShortcodeSpan::class.java).firstOrNull()?.remove()
111111
}
112112
}

0 commit comments

Comments
 (0)