kunfei 4 лет назад
Родитель
Сommit
61ea301c2e

+ 0 - 9
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
-        }
-    }
-
 }

+ 5 - 4
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
 }