Skip to content

Commit 37963ea

Browse files
committed
[Fix]
- View state error after refresh
1 parent 5ef8c5d commit 37963ea

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

filepicker/src/main/java/me/rosuh/filepicker/FilePickerActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ class FilePickerActivity : AppCompatActivity(), View.OnClickListener,
216216

217217
swipe_refresh_layout?.apply {
218218
setOnRefreshListener {
219+
resetViewState()
219220
loadList()
220221
}
221222
isRefreshing = true
@@ -441,7 +442,7 @@ class FilePickerActivity : AppCompatActivity(), View.OnClickListener,
441442
*/
442443
private fun enterDirAndUpdateUI(fileBean: FileBean) {
443444
// 清除当前选中状态
444-
cleanStatus()
445+
resetViewState()
445446

446447
// 获取文件夹文件
447448
val nextFiles = File(fileBean.filePath)
@@ -490,7 +491,7 @@ class FilePickerActivity : AppCompatActivity(), View.OnClickListener,
490491
btn_selected_all_file_picker?.isEnabled = isEnable
491492
}
492493

493-
private fun cleanStatus() {
494+
private fun resetViewState() {
494495
selectedCount = 1
495496
updateItemUI(false)
496497
}

0 commit comments

Comments
 (0)