We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cfa4d3 commit f015b60Copy full SHA for f015b60
mini-common/src/main/java/mini/Resource.kt
@@ -54,7 +54,7 @@ open class Resource<out T> @PublishedApi internal constructor(val value: Any?) {
54
}
55
56
override fun toString(): String {
57
- return value.toString()
+ return if (isSuccess) "Success($value)" else value.toString()
58
59
60
override fun equals(other: Any?): Boolean {
@@ -87,6 +87,7 @@ class Task(value: Any?) : Resource<Unit>(value) {
87
88
89
return when {
90
+ isSuccess -> "Success"
91
isIdle -> "Idle"
92
else -> value.toString()
93
0 commit comments