File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
omegatypes/src/main/java/com/omega_r/libs/omegatypes Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ open class Text(protected val defaultTextStyle: TextStyle?) : Serializable {
7878 return TextBuilder .BuilderText (this ) + string
7979 }
8080
81+ operator fun plus (textStyle : TextStyle ? ): Text {
82+ return textStyle?.let { from(this , textStyle = textStyle) } ? : this
83+ }
84+
8185 override fun equals (other : Any? ): Boolean {
8286 if (this == = other) return true
8387 if (javaClass != other?.javaClass) return false
@@ -323,4 +327,6 @@ operator fun Text?.plus(text: Text?): Text? {
323327 }
324328}
325329
326- operator fun Text.plus (textStyle : TextStyle ) = Text .from(this , textStyle = textStyle)
330+ operator fun Text?.plus (textStyle : TextStyle ? ): Text ? {
331+ return this ?.let { this + textStyle }
332+ }
You can’t perform that action at this time.
0 commit comments