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 8ed51dd commit b6ba32dCopy full SHA for b6ba32d
mini-common/src/main/java/mini/Resource.kt
@@ -35,6 +35,7 @@ open class Resource<out T> @PublishedApi internal constructor(val value: Any?) {
35
*/
36
fun getOrNull(): T? =
37
when {
38
+ isLoading -> (value as Loading<T>).value
39
isSuccess -> value as T?
40
else -> null
41
}
0 commit comments