drake пре 5 година
родитељ
комит
10acf65225

+ 1 - 1
README.md

@@ -80,7 +80,7 @@ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
 // 支持自动下拉刷新和缺省页的, 可选, 刷新头和上拉加载参考SmartRefreshLayout
 implementation 'com.github.liangjingkanji:BRV:1.2.1'
 
-implementation 'com.github.liangjingkanji:Net:2.0.9'
+implementation 'com.github.liangjingkanji:Net:2.0.10'
 ```
 
 

+ 1 - 1
build.gradle

@@ -4,7 +4,7 @@ buildscript {
 
     ext {
         kotlin_version = '1.3.61'
-        brv_version = '1.2.3'
+        brv_version = '1.2.5'
         coroutine_version = '1.3.0'
         glide_version = '4.9.0'
     }

+ 3 - 3
net/src/main/java/com/drake/net/scope/PageCoroutineScope.kt

@@ -53,7 +53,7 @@ class PageCoroutineScope(
         if (cacheSucceed) {
             finish(false)
         } else {
-            page.showError()
+            page.showError(e)
         }
     }
 
@@ -89,8 +89,8 @@ class PageCoroutineScope(
     /**
      * 显示空缺省页
      */
-    fun showEmpty() {
-        page.showEmpty()
+    fun showEmpty(tag: Any? = null) {
+        page.showEmpty(tag)
         autoOff()
     }
 

+ 3 - 3
net/src/main/java/com/drake/net/scope/StateCoroutineScope.kt

@@ -56,7 +56,7 @@ class StateCoroutineScope(val state: StateLayout) : NetCoroutineScope() {
     override fun catch(e: Throwable) {
         super.catch(e)
         if (!cacheSucceed) {
-            state.showError()
+            state.showError(e)
         }
     }
 
@@ -76,8 +76,8 @@ class StateCoroutineScope(val state: StateLayout) : NetCoroutineScope() {
     }
 
 
-    fun showEmpty() {
-        state.showEmpty()
+    fun showEmpty(tag: Any? = null) {
+        state.showEmpty(tag)
         autoOff()
     }