优化
This commit is contained in:
@@ -46,9 +46,8 @@ object BookHelp {
|
|||||||
*/
|
*/
|
||||||
fun clearRemovedCache() {
|
fun clearRemovedCache() {
|
||||||
Coroutine.async {
|
Coroutine.async {
|
||||||
val bookFolderNames = arrayListOf<String>()
|
val bookFolderNames = appDb.bookDao.all.map {
|
||||||
appDb.bookDao.all.forEach {
|
it.getFolderName()
|
||||||
bookFolderNames.add(it.getFolderName())
|
|
||||||
}
|
}
|
||||||
val file = downloadDir.getFile(cacheFolderName)
|
val file = downloadDir.getFile(cacheFolderName)
|
||||||
file.listFiles()?.forEach { bookFile ->
|
file.listFiles()?.forEach { bookFile ->
|
||||||
|
|||||||
Reference in New Issue
Block a user