pull/1284/head
gedoor 3 years ago
parent 92eb49e8e6
commit afd1a82259
  1. 4
      app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt

@ -15,10 +15,12 @@ class HandleFileContract :
const val FILE = 1 const val FILE = 1
} }
override fun createIntent(context: Context, input: HandleFileParam.() -> Unit): Intent { override fun createIntent(context: Context, input: (HandleFileParam.() -> Unit)?): Intent {
val intent = Intent(context, HandleFileActivity::class.java) val intent = Intent(context, HandleFileActivity::class.java)
val handleFileParam = HandleFileParam() val handleFileParam = HandleFileParam()
input?.let {
handleFileParam.apply(input) handleFileParam.apply(input)
}
handleFileParam.let { handleFileParam.let {
intent.putExtra("mode", it.mode) intent.putExtra("mode", it.mode)
intent.putExtra("title", it.title) intent.putExtra("title", it.title)

Loading…
Cancel
Save