From 88d0ef2cfa147a2ce411917bd63740233a83d464 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 3 Oct 2022 10:27:43 +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 --- .../main/java/io/legado/app/constant/BookSourceType.kt | 9 --------- app/src/main/java/io/legado/app/constant/BookType.kt | 9 +++++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/BookSourceType.kt b/app/src/main/java/io/legado/app/constant/BookSourceType.kt index e64f95731..f961a9f65 100644 --- a/app/src/main/java/io/legado/app/constant/BookSourceType.kt +++ b/app/src/main/java/io/legado/app/constant/BookSourceType.kt @@ -14,13 +14,4 @@ object BookSourceType { @IntDef(default, audio, image, file) annotation class Type - fun toBookType(sourceType: Int) { - when (sourceType) { - file -> BookType.text or BookType.webFile - image -> BookType.image - audio -> BookType.audio - else -> BookType.text - } - } - } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/constant/BookType.kt b/app/src/main/java/io/legado/app/constant/BookType.kt index 1789240d8..9f64ea60a 100644 --- a/app/src/main/java/io/legado/app/constant/BookType.kt +++ b/app/src/main/java/io/legado/app/constant/BookType.kt @@ -33,6 +33,11 @@ object BookType { const val local = 0b100000000 + @Target(AnnotationTarget.VALUE_PARAMETER) + @Retention(AnnotationRetention.SOURCE) + @IntDef(text, audio, image, webFile) + annotation class Type + /** * 本地书籍书源标志 */ @@ -43,8 +48,4 @@ object BookType { */ const val webDavTag = "webDav::" - @Target(AnnotationTarget.VALUE_PARAMETER) - @Retention(AnnotationRetention.SOURCE) - @IntDef(text, audio, image, webFile) - annotation class Type } \ No newline at end of file