@momo-kits/native-kits 0.156.8-debug → 0.156.9-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/compose/build.gradle.kts
CHANGED
|
@@ -49,9 +49,20 @@ import vn.momo.kits.utils.formatNumberToMoney
|
|
|
49
49
|
|
|
50
50
|
class CustomConverter : VisualTransformation {
|
|
51
51
|
override fun filter(text: AnnotatedString): TransformedText {
|
|
52
|
-
if (text.text.isEmpty()
|
|
52
|
+
if (text.text.isEmpty()) {
|
|
53
|
+
return TransformedText(
|
|
54
|
+
AnnotatedString("0"),
|
|
55
|
+
object : OffsetMapping {
|
|
56
|
+
override fun originalToTransformed(offset: Int): Int = 0
|
|
57
|
+
override fun transformedToOriginal(offset: Int): Int = 0
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (text.text == "0") {
|
|
53
63
|
return TransformedText(AnnotatedString("0"), OffsetMapping.Identity)
|
|
54
64
|
}
|
|
65
|
+
|
|
55
66
|
val formattedText = formatNumberToMoney(text.text.toLong())
|
|
56
67
|
|
|
57
68
|
return TransformedText(
|
package/gradle.properties
CHANGED