Save images to download location by default

This commit is contained in:
FooIbar authored and tarsin committed 2022-12-26 16:37:38 +08:00
1 parent 66fbc7e821
commit 462e0257a9
7 files changed
+29 -1

No files matched your search

@@ -422,7 +422,7 @@ class ReaderActivity : EhActivity() {
}
}
private fun saveImage(page: Int) {
fun saveImage(page: Int) {
if (null == mGalleryProvider) {
return
}
@@ -21,6 +21,7 @@ class ReaderPageSheet(
binding.share.setOnClickListener { share() }
binding.save.setOnClickListener { save() }
binding.saveTo.setOnClickListener { saveTo() }
return binding.root
}
@@ -37,6 +38,14 @@ class ReaderPageSheet(
* Saves the image of this page on external storage.
*/
private fun save() {
activity.saveImage(page.index)
dismiss()
}
/**
* Saves the image of this page to a custom location on external storage.
*/
private fun saveTo() {
activity.saveImageTo(page.index)
dismiss()
}