Skip to content

Commit

Permalink
fix: 修复onRefresh中立即showContent导致一直加载中
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjingkanji committed Aug 31, 2023
1 parent a11f616 commit e3132ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a href="http://liangjingkanji.github.io/StateLayout/">使用文档</a>
| <a href="https://github.com/liangjingkanji/document/blob/master/visit-pages.md">无法访问?</a>
| <a href="https://github.com/liangjingkanji/StateLayout/releases/download/1.4.1/state-layout-sample.apk">下载体验</a>
| <a href="https://github.com/liangjingkanji/StateLayout/releases/latest/download/state-layout-sample.apk">下载体验</a>
</p>

<p align="center">
Expand Down Expand Up @@ -75,7 +75,7 @@ dependencyResolutionManagement {
然后在 module 的 build.gradle 添加依赖框架

```groovy
implementation 'com.github.liangjingkanji:StateLayout:1.4.1'
implementation 'com.github.liangjingkanji:StateLayout:1.4.2'
```

<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ class StateLayout @JvmOverloads constructor(
silent: Boolean = false,
refresh: Boolean = true,
) {
if (refresh) onRefresh?.invoke(this, tag)
if (!silent) showStatus(LOADING, tag)
if (refresh) onRefresh?.invoke(this, tag)
}

/**
Expand Down

0 comments on commit e3132ae

Please sign in to comment.