From c29dfbb9ed4530d0d8d7633493863ff62cb1c387 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 19 Nov 2021 23:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/book/source/manage/BookSourceActivity.kt | 6 +----- .../java/io/legado/app/ui/document/HandleFileContract.kt | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index aa21d2cbf..333d1908b 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -349,11 +349,7 @@ class BookSourceActivity : VMBaseActivity viewModel.saveToFile(adapter.selection) { file -> exportDir.launch { mode = HandleFileContract.EXPORT - fileData = Triple( - "bookSource.json", - file.readBytes(), - "application/json" - ) + fileData = Triple("bookSource.json", file, "application/json") } } } diff --git a/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt b/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt index b33d2ef70..af2dda346 100644 --- a/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt +++ b/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt @@ -55,7 +55,7 @@ class HandleFileContract : var title: String? = null, var allowExtensions: Array = arrayOf(), var otherActions: ArrayList>? = null, - var fileData: Triple? = null, + var fileData: Triple? = null, var requestCode: Int = 0 )