File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
aztec/src/main/kotlin/org/wordpress/aztec Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 11package org.wordpress.aztec.source
22
3- import androidx.core.text.TextDirectionHeuristicsCompat
43import android.text.Editable
54import android.text.Layout
65import android.text.Spannable
76import android.text.style.BackgroundColorSpan
87import android.text.style.ForegroundColorSpan
8+ import androidx.core.text.TextDirectionHeuristicsCompat
99import org.wordpress.aztec.AztecAttributes
1010import org.wordpress.aztec.spans.IAztecAlignmentSpan
1111import org.wordpress.aztec.spans.IAztecAttributedSpan
@@ -121,7 +121,7 @@ class CssStyleFormatter {
121121
122122 var styleAttributeValue = " "
123123 if (m.find()) {
124- styleAttributeValue = m.group(1 )
124+ m.group(1 )?. let { styleAttributeValue = it }
125125 }
126126 return styleAttributeValue
127127 }
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package org.wordpress.aztec.util
22
33import android.content.Context
44import android.os.Bundle
5- import android.text.TextUtils
65import org.wordpress.android.util.AppLog
76import java.io.File
87import java.io.FileInputStream
@@ -50,7 +49,7 @@ class InstanceStateUtils {
5049 // the full path is kept in the bundle so, get it from there
5150 val filename = bundle.getString(cacheFilenameKey(varName))
5251
53- if (TextUtils .isEmpty(filename )) {
52+ if (filename.isNullOrEmpty( )) {
5453 return defaultValue
5554 }
5655
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class DeleteMediaElementWatcherAPI25AndHigher(aztecText: AztecText) : TextWatche
3939 // real user deletions.
4040 aztecTextRef.get()?.postDelayed({
4141 while (! queueHasBeenPopulatedInThisTimeframe && deletedSpans.isNotEmpty()) {
42- deletedSpans.poll().onMediaDeleted()
42+ deletedSpans.poll()? .onMediaDeleted()
4343 }
4444 queueHasBeenPopulatedInThisTimeframe = false
4545 }, 500 )
You can’t perform that action at this time.
0 commit comments