mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-11 08:27:50 -04:00
Merge pull request #3535 from kiwix/search_not_working_in_dwds_app
Fixed, the search is not working in dwds app.
This commit is contained in:
commit
e6b76a5327
@ -320,7 +320,6 @@ class ZimFileReader constructor(
|
|||||||
fun dispose() {
|
fun dispose() {
|
||||||
jniKiwixReader.dispose()
|
jniKiwixReader.dispose()
|
||||||
searcher.dispose()
|
searcher.dispose()
|
||||||
assetFileDescriptor?.parcelFileDescriptor?.detachFd()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("TooGenericExceptionCaught")
|
@Suppress("TooGenericExceptionCaught")
|
||||||
|
@ -84,9 +84,12 @@ class ZimReaderContainer @Inject constructor(private val zimFileReaderFactory: F
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun copyReader(): ZimFileReader? = zimFile?.let(zimFileReaderFactory::create)
|
fun copyReader(): ZimFileReader? = zimFile?.let(zimFileReaderFactory::create)
|
||||||
|
?: assetFileDescriptor?.let(zimFileReaderFactory::create)
|
||||||
|
|
||||||
val zimFile get() = zimFileReader?.zimFile
|
val zimFile get() = zimFileReader?.zimFile
|
||||||
|
|
||||||
|
val assetFileDescriptor get() = zimFileReader?.assetFileDescriptor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the zimFile path if opened from file else return the filePath of assetFileDescriptor
|
* Return the zimFile path if opened from file else return the filePath of assetFileDescriptor
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user