添加导出文件夹选择

pull/862/head
gedoor 4 years ago
parent dc5f86acdc
commit e12f972c63
  1. 9
      app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt

@ -193,6 +193,15 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
override fun export(position: Int) { override fun export(position: Int) {
exportPosition = position exportPosition = position
val path = ACache.get(this@CacheActivity).getAsString(exportBookPathKey)
if (path.isNullOrEmpty()) {
selectExportFolder()
} else {
startExport(path)
}
}
private fun selectExportFolder() {
val default = arrayListOf<String>() val default = arrayListOf<String>()
val path = ACache.get(this@CacheActivity).getAsString(exportBookPathKey) val path = ACache.get(this@CacheActivity).getAsString(exportBookPathKey)
if (!path.isNullOrEmpty()) { if (!path.isNullOrEmpty()) {

Loading…
Cancel
Save