Skip to content

Commit 8c29ed4

Browse files
committed
Rremove JvmOverloads and add textStyle for toText
1 parent 916d9ca commit 8c29ed4

File tree

1 file changed

+3
-2
lines changed
  • omegatypes/src/main/java/com/omega_r/libs/omegatypes

1 file changed

+3
-2
lines changed

omegatypes/src/main/java/com/omega_r/libs/omegatypes/Text.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ open class Text(protected val defaultTextStyle: TextStyle? ) : Serializable {
223223

224224
}
225225

226-
@JvmOverloads // todo: remove, temporary
227226
fun TextView.setText(text: Text?, textStyle: TextStyle? = null) {
228227
if (text == null) {
229228
this.text = null
@@ -270,4 +269,6 @@ operator fun Text.plus(string: String) : Text {
270269
return TextBuilder.BuilderText(this) + string
271270
}
272271

273-
fun String.toText() = Text.from(this)
272+
fun String.toText(textStyle: TextStyle? = null) = Text.from(this, textStyle)
273+
274+
operator fun Text.plus(textStyle: TextStyle) = Text.from(this, textStyle = textStyle)

0 commit comments

Comments
 (0)