Commit a73bb014 authored by 周文华's avatar 周文华

【修复】修复pdf有时候有空文件显示的问题。

parent d98d153d
...@@ -260,7 +260,10 @@ class MainPresenter( ...@@ -260,7 +260,10 @@ class MainPresenter(
val list = context.getMediaFile(selectionArgs = selectionArgs) val list = context.getMediaFile(selectionArgs = selectionArgs)
val documentList = list.map { val documentList = list.filter {
val file = File(it.path)
file.exists() && file.length() > 0f
}.map {
DocumentBean(it.path, uri = it.uri, type = TYPE_PDF) DocumentBean(it.path, uri = it.uri, type = TYPE_PDF)
} }
val new = documentList.toMutableList() val new = documentList.toMutableList()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment