pull/1434/head
gedoor 3 years ago
parent ee25e3e777
commit c29dfbb9ed
  1. 6
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt

@ -349,11 +349,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
R.id.menu_export_selection -> viewModel.saveToFile(adapter.selection) { file -> R.id.menu_export_selection -> viewModel.saveToFile(adapter.selection) { file ->
exportDir.launch { exportDir.launch {
mode = HandleFileContract.EXPORT mode = HandleFileContract.EXPORT
fileData = Triple( fileData = Triple("bookSource.json", file, "application/json")
"bookSource.json",
file.readBytes(),
"application/json"
)
} }
} }
} }

@ -55,7 +55,7 @@ class HandleFileContract :
var title: String? = null, var title: String? = null,
var allowExtensions: Array<String> = arrayOf(), var allowExtensions: Array<String> = arrayOf(),
var otherActions: ArrayList<SelectItem<Int>>? = null, var otherActions: ArrayList<SelectItem<Int>>? = null,
var fileData: Triple<String, ByteArray, String>? = null, var fileData: Triple<String, Any, String>? = null,
var requestCode: Int = 0 var requestCode: Int = 0
) )

Loading…
Cancel
Save