mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-14 18:06:39 -04:00
#2361 removed writeText and added copyTo method in saveHandler class
This commit is contained in:
parent
e98d873eae
commit
adad1f12f6
@ -174,8 +174,9 @@ open class KiwixWebView @SuppressLint("SetJavaScriptEnabled") constructor(
|
||||
}
|
||||
val source = Uri.parse(src)
|
||||
try {
|
||||
val input = zimReaderContainer.load("$source").data
|
||||
storageDir.writeText(input.readBytes().toString())
|
||||
zimReaderContainer.load("$source").data.use {
|
||||
it.copyTo(storageDir.outputStream())
|
||||
}
|
||||
val toastText = instance.getString(R.string.save_media_saved, newUrl)
|
||||
instance.toast(toastText)
|
||||
} catch (e: IOException) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user