From 2442e747d387ba94887a775397188149411beb2e Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 27 Aug 2020 22:10:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/model/Debug.kt | 2 ++ app/src/main/java/io/legado/app/model/{ => rss}/Rss.kt | 2 +- .../io/legado/app/model/{ => webBook}/SearchBookModel.kt | 2 +- .../main/java/io/legado/app/model/{ => webBook}/WebBook.kt | 7 ++----- app/src/main/java/io/legado/app/service/DownloadService.kt | 2 +- app/src/main/java/io/legado/app/service/help/AudioPlay.kt | 2 +- .../main/java/io/legado/app/service/help/CheckSource.kt | 2 +- app/src/main/java/io/legado/app/service/help/ReadBook.kt | 2 +- .../main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt | 2 +- .../legado/app/ui/book/changecover/ChangeCoverViewModel.kt | 2 +- .../app/ui/book/changesource/ChangeSourceViewModel.kt | 2 +- .../io/legado/app/ui/book/explore/ExploreShowViewModel.kt | 2 +- .../java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 2 +- .../java/io/legado/app/ui/book/read/ReadBookViewModel.kt | 2 +- .../java/io/legado/app/ui/book/search/SearchViewModel.kt | 2 +- .../app/ui/book/source/debug/BookSourceDebugModel.kt | 2 +- app/src/main/java/io/legado/app/ui/main/MainViewModel.kt | 2 +- .../io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt | 2 +- .../io/legado/app/ui/rss/article/RssArticlesViewModel.kt | 2 +- .../java/io/legado/app/ui/rss/read/ReadRssViewModel.kt | 2 +- .../io/legado/app/web/controller/BookshelfController.kt | 2 +- .../io/legado/app/web/controller/SourceDebugWebSocket.kt | 2 +- 22 files changed, 24 insertions(+), 25 deletions(-) rename app/src/main/java/io/legado/app/model/{ => rss}/Rss.kt (98%) rename app/src/main/java/io/legado/app/model/{ => webBook}/SearchBookModel.kt (98%) rename app/src/main/java/io/legado/app/model/{ => webBook}/WebBook.kt (96%) diff --git a/app/src/main/java/io/legado/app/model/Debug.kt b/app/src/main/java/io/legado/app/model/Debug.kt index 85c87812c..795170985 100644 --- a/app/src/main/java/io/legado/app/model/Debug.kt +++ b/app/src/main/java/io/legado/app/model/Debug.kt @@ -6,6 +6,8 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.RssArticle import io.legado.app.data.entities.RssSource import io.legado.app.help.coroutine.CompositeCoroutine +import io.legado.app.model.rss.Rss +import io.legado.app.model.webBook.WebBook import io.legado.app.utils.htmlFormat import io.legado.app.utils.isAbsUrl import java.text.SimpleDateFormat diff --git a/app/src/main/java/io/legado/app/model/Rss.kt b/app/src/main/java/io/legado/app/model/rss/Rss.kt similarity index 98% rename from app/src/main/java/io/legado/app/model/Rss.kt rename to app/src/main/java/io/legado/app/model/rss/Rss.kt index 7b6d2e266..f9ea78195 100644 --- a/app/src/main/java/io/legado/app/model/Rss.kt +++ b/app/src/main/java/io/legado/app/model/rss/Rss.kt @@ -1,4 +1,4 @@ -package io.legado.app.model +package io.legado.app.model.rss import io.legado.app.data.entities.RssArticle import io.legado.app.data.entities.RssSource diff --git a/app/src/main/java/io/legado/app/model/SearchBookModel.kt b/app/src/main/java/io/legado/app/model/webBook/SearchBookModel.kt similarity index 98% rename from app/src/main/java/io/legado/app/model/SearchBookModel.kt rename to app/src/main/java/io/legado/app/model/webBook/SearchBookModel.kt index 1f6cac065..0cb36d1c7 100644 --- a/app/src/main/java/io/legado/app/model/SearchBookModel.kt +++ b/app/src/main/java/io/legado/app/model/webBook/SearchBookModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.model +package io.legado.app.model.webBook import io.legado.app.App import io.legado.app.data.entities.SearchBook diff --git a/app/src/main/java/io/legado/app/model/WebBook.kt b/app/src/main/java/io/legado/app/model/webBook/WebBook.kt similarity index 96% rename from app/src/main/java/io/legado/app/model/WebBook.kt rename to app/src/main/java/io/legado/app/model/webBook/WebBook.kt index cb1742132..cdf5553ee 100644 --- a/app/src/main/java/io/legado/app/model/WebBook.kt +++ b/app/src/main/java/io/legado/app/model/webBook/WebBook.kt @@ -1,15 +1,12 @@ -package io.legado.app.model +package io.legado.app.model.webBook import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook import io.legado.app.help.coroutine.Coroutine +import io.legado.app.model.Debug import io.legado.app.model.analyzeRule.AnalyzeUrl -import io.legado.app.model.webBook.BookChapterList -import io.legado.app.model.webBook.BookContent -import io.legado.app.model.webBook.BookInfo -import io.legado.app.model.webBook.BookList import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlin.coroutines.CoroutineContext diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index b21d4e36e..047e8d643 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -16,7 +16,7 @@ import io.legado.app.help.BookHelp import io.legado.app.help.IntentHelp import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.help.coroutine.Coroutine -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.help.Download import io.legado.app.utils.postEvent import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt index 7c8d120b3..06bb6b5a9 100644 --- a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt +++ b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData import io.legado.app.constant.IntentAction import io.legado.app.constant.Status import io.legado.app.data.entities.Book -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.AudioPlayService object AudioPlay { diff --git a/app/src/main/java/io/legado/app/service/help/CheckSource.kt b/app/src/main/java/io/legado/app/service/help/CheckSource.kt index c387e526c..7ae99e667 100644 --- a/app/src/main/java/io/legado/app/service/help/CheckSource.kt +++ b/app/src/main/java/io/legado/app/service/help/CheckSource.kt @@ -7,7 +7,7 @@ import io.legado.app.R import io.legado.app.constant.IntentAction import io.legado.app.data.entities.BookSource import io.legado.app.help.coroutine.Coroutine -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.CheckSourceService import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers diff --git a/app/src/main/java/io/legado/app/service/help/ReadBook.kt b/app/src/main/java/io/legado/app/service/help/ReadBook.kt index e15af105b..0d7c4c982 100644 --- a/app/src/main/java/io/legado/app/service/help/ReadBook.kt +++ b/app/src/main/java/io/legado/app/service/help/ReadBook.kt @@ -13,7 +13,7 @@ import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.IntentDataHelp import io.legado.app.help.coroutine.Coroutine -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.BaseReadAloudService import io.legado.app.ui.book.read.page.entities.TextChapter import io.legado.app.ui.book.read.page.provider.ChapterProvider diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt index 124fd710f..4c1a5a85b 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt @@ -8,7 +8,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.help.BookHelp -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.help.AudioPlay import kotlinx.coroutines.Dispatchers diff --git a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt index 0c91fe0f9..835c3a885 100644 --- a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt @@ -9,7 +9,7 @@ import io.legado.app.constant.AppPattern import io.legado.app.data.entities.SearchBook import io.legado.app.help.AppConfig import io.legado.app.help.coroutine.Coroutine -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.asCoroutineDispatcher import java.util.concurrent.Executors diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt index 2997b0780..4b50151ef 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt @@ -14,7 +14,7 @@ import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook import io.legado.app.help.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.utils.getPrefBoolean import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.ExecutorCoroutineDispatcher diff --git a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowViewModel.kt b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowViewModel.kt index bd22b3968..9e7b8dd11 100644 --- a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowViewModel.kt @@ -7,7 +7,7 @@ import io.legado.app.App import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import kotlinx.coroutines.Dispatchers.IO class ExploreShowViewModel(application: Application) : BaseViewModel(application) { diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index 3a36170e4..8f2ed64c2 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt @@ -9,7 +9,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.help.BookHelp -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.model.localBook.LocalBook import io.legado.app.service.help.ReadBook import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index d7fb413f0..249141890 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -10,7 +10,7 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.IntentDataHelp -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.model.localBook.LocalBook import io.legado.app.service.BaseReadAloudService import io.legado.app.service.help.ReadAloud diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt index 318937697..e06c6f81a 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt @@ -8,7 +8,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.constant.PreferKey import io.legado.app.data.entities.SearchBook import io.legado.app.data.entities.SearchKeyword -import io.legado.app.model.SearchBookModel +import io.legado.app.model.webBook.SearchBookModel import io.legado.app.utils.getPrefBoolean import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.isActive diff --git a/app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugModel.kt b/app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugModel.kt index b17ec5e9f..c7755401d 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugModel.kt @@ -4,7 +4,7 @@ import android.app.Application import io.legado.app.App import io.legado.app.base.BaseViewModel import io.legado.app.model.Debug -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook class BookSourceDebugModel(application: Application) : BaseViewModel(application), Debug.Callback { diff --git a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt index fbacdd448..452e77c18 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt @@ -11,7 +11,7 @@ import io.legado.app.help.AppConfig import io.legado.app.help.DefaultValueHelp import io.legado.app.help.http.HttpHelper import io.legado.app.help.storage.Restore -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.utils.FileUtils import io.legado.app.utils.GSON import io.legado.app.utils.fromJsonObject diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt index dda342015..ae1287842 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt @@ -7,7 +7,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookGroup import io.legado.app.data.entities.BookSource -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.utils.NetworkUtils import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt index 8ab79c861..44f125ef2 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt @@ -7,7 +7,7 @@ import io.legado.app.App import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.RssArticle import io.legado.app.data.entities.RssSource -import io.legado.app.model.Rss +import io.legado.app.model.rss.Rss import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt index f5fa3f97b..11b4ba940 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt @@ -17,7 +17,7 @@ import io.legado.app.data.entities.RssArticle import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssStar import io.legado.app.help.http.HttpHelper -import io.legado.app.model.Rss +import io.legado.app.model.rss.Rss import io.legado.app.model.analyzeRule.AnalyzeUrl import io.legado.app.utils.DocumentUtils import io.legado.app.utils.FileUtils diff --git a/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt b/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt index 9871ff72a..203bb37da 100644 --- a/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt +++ b/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt @@ -4,7 +4,7 @@ import io.legado.app.App import io.legado.app.constant.PreferKey import io.legado.app.data.entities.Book import io.legado.app.help.BookHelp -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.service.help.ReadBook import io.legado.app.utils.GSON import io.legado.app.utils.fromJsonObject diff --git a/app/src/main/java/io/legado/app/web/controller/SourceDebugWebSocket.kt b/app/src/main/java/io/legado/app/web/controller/SourceDebugWebSocket.kt index 77b4384c1..ae3172d2f 100644 --- a/app/src/main/java/io/legado/app/web/controller/SourceDebugWebSocket.kt +++ b/app/src/main/java/io/legado/app/web/controller/SourceDebugWebSocket.kt @@ -6,7 +6,7 @@ import fi.iki.elonen.NanoWSD import io.legado.app.App import io.legado.app.R import io.legado.app.model.Debug -import io.legado.app.model.WebBook +import io.legado.app.model.webBook.WebBook import io.legado.app.utils.GSON import io.legado.app.utils.fromJsonObject import io.legado.app.utils.isJson