mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-09 07:16:04 -04:00
Fixed: CustomDownloadFragment was not showing if there is no ZIM file available in custom apps.
This commit is contained in:
parent
933658c10c
commit
05891eba03
@ -123,7 +123,13 @@ class CustomFileValidator @Inject constructor(private val context: Context) {
|
|||||||
directoryList.add(dir)
|
directoryList.add(dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return scanDirs(directoryList.toTypedArray(), "zim")
|
return scanDirs(directoryList.toTypedArray(), "zim").filterNot {
|
||||||
|
// Excluding the demo.zim file from the list as it is used for demonstration purposes
|
||||||
|
// on the ZimHostFragment for hosting the ZIM file on the server.
|
||||||
|
// Since we are now using the "asset delivery mode", in this we are using the
|
||||||
|
// assetFileDescriptor instead of a regular file.
|
||||||
|
it.name.equals("demo.zim", ignoreCase = true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun scanDirs(dirs: Array<out File?>?, extensionToMatch: String): List<File> =
|
private fun scanDirs(dirs: Array<out File?>?, extensionToMatch: String): List<File> =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user