|
|
@ -15,6 +15,8 @@ import io.legado.app.constant.EventBus |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.help.BookHelp |
|
|
|
import io.legado.app.help.BookHelp |
|
|
|
|
|
|
|
import io.legado.app.help.permission.Permissions |
|
|
|
|
|
|
|
import io.legado.app.help.permission.PermissionsCompat |
|
|
|
import io.legado.app.service.help.Download |
|
|
|
import io.legado.app.service.help.Download |
|
|
|
import io.legado.app.ui.filechooser.FileChooserDialog |
|
|
|
import io.legado.app.ui.filechooser.FileChooserDialog |
|
|
|
import io.legado.app.utils.ACache |
|
|
|
import io.legado.app.utils.ACache |
|
|
@ -145,11 +147,17 @@ class DownloadActivity : VMBaseActivity<DownloadViewModel>(R.layout.activity_dow |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
2 -> { |
|
|
|
2 -> { |
|
|
|
FileChooserDialog.show( |
|
|
|
PermissionsCompat.Builder(this@DownloadActivity) |
|
|
|
supportFragmentManager, |
|
|
|
.addPermissions(*Permissions.Group.STORAGE) |
|
|
|
exportRequestCode, |
|
|
|
.rationale(R.string.tip_perm_request_storage) |
|
|
|
mode = FileChooserDialog.DIRECTORY |
|
|
|
.onGranted { |
|
|
|
) |
|
|
|
FileChooserDialog.show( |
|
|
|
|
|
|
|
supportFragmentManager, |
|
|
|
|
|
|
|
exportRequestCode, |
|
|
|
|
|
|
|
mode = FileChooserDialog.DIRECTORY |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.request() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|