mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
8972b218a3
commit
edf5890cb1
@ -13,7 +13,6 @@ import com.google.gson.Gson
|
|||||||
import io.legado.app.api.controller.BookController
|
import io.legado.app.api.controller.BookController
|
||||||
import io.legado.app.api.controller.BookSourceController
|
import io.legado.app.api.controller.BookSourceController
|
||||||
import io.legado.app.api.controller.RssSourceController
|
import io.legado.app.api.controller.RssSourceController
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export book data to other app.
|
* Export book data to other app.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package io.legado.app.help
|
package io.legado.app.help
|
||||||
|
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
@ -5,7 +5,6 @@ import android.app.Application
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import io.legado.app.base.BaseService
|
import io.legado.app.base.BaseService
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity管理器,管理项目中Activity的状态
|
* Activity管理器,管理项目中Activity的状态
|
||||||
|
@ -7,7 +7,6 @@ import io.legado.app.constant.BookType
|
|||||||
import io.legado.app.data.entities.BookSource
|
import io.legado.app.data.entities.BookSource
|
||||||
import io.legado.app.data.entities.rule.*
|
import io.legado.app.data.entities.rule.*
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import splitties.init.appCtx
|
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@ import android.webkit.WebViewClient
|
|||||||
import io.legado.app.constant.AppConst
|
import io.legado.app.constant.AppConst
|
||||||
import io.legado.app.model.NoStackTraceException
|
import io.legado.app.model.NoStackTraceException
|
||||||
import io.legado.app.utils.runOnUI
|
import io.legado.app.utils.runOnUI
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.Runnable
|
||||||
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import org.apache.commons.text.StringEscapeUtils
|
import org.apache.commons.text.StringEscapeUtils
|
||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
|
@ -9,7 +9,6 @@ import androidx.core.content.ContextCompat
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.utils.startActivity
|
import io.legado.app.utils.startActivity
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@Suppress("MemberVisibilityCanBePrivate")
|
@Suppress("MemberVisibilityCanBePrivate")
|
||||||
internal class Request : OnRequestPermissionsResultCallback {
|
internal class Request : OnRequestPermissionsResultCallback {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.legado.app.lib.theme
|
package io.legado.app.lib.theme
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.annotation.AttrRes
|
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
|
import androidx.annotation.AttrRes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Aidan Follestad (afollestad)
|
* @author Aidan Follestad (afollestad)
|
||||||
|
@ -3,7 +3,7 @@ package io.legado.app.lib.webdav
|
|||||||
import io.legado.app.help.http.newCallResponseBody
|
import io.legado.app.help.http.newCallResponseBody
|
||||||
import io.legado.app.help.http.okHttpClient
|
import io.legado.app.help.http.okHttpClient
|
||||||
import io.legado.app.help.http.text
|
import io.legado.app.help.http.text
|
||||||
import okhttp3.*
|
import okhttp3.Credentials
|
||||||
import okhttp3.MediaType.Companion.toMediaType
|
import okhttp3.MediaType.Companion.toMediaType
|
||||||
import okhttp3.RequestBody.Companion.asRequestBody
|
import okhttp3.RequestBody.Companion.asRequestBody
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
@ -15,7 +15,6 @@ import java.io.InputStream
|
|||||||
import java.net.MalformedURLException
|
import java.net.MalformedURLException
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.net.URLEncoder
|
import java.net.URLEncoder
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
||||||
class WebDav(urlStr: String) {
|
class WebDav(urlStr: String) {
|
||||||
|
@ -4,9 +4,9 @@ import android.content.Context
|
|||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.constant.IntentAction
|
import io.legado.app.constant.IntentAction
|
||||||
import io.legado.app.data.entities.BookSource
|
import io.legado.app.data.entities.BookSource
|
||||||
|
import io.legado.app.help.CacheManager
|
||||||
import io.legado.app.service.CheckSourceService
|
import io.legado.app.service.CheckSourceService
|
||||||
import io.legado.app.utils.startService
|
import io.legado.app.utils.startService
|
||||||
import io.legado.app.help.CacheManager
|
|
||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
|
|
||||||
object CheckSource {
|
object CheckSource {
|
||||||
|
@ -12,7 +12,6 @@ import io.legado.app.utils.msg
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.HashMap
|
|
||||||
|
|
||||||
object Debug {
|
object Debug {
|
||||||
var callback: Callback? = null
|
var callback: Callback? = null
|
||||||
|
@ -3,9 +3,7 @@ package io.legado.app.model.analyzeRule
|
|||||||
import androidx.annotation.Keep
|
import androidx.annotation.Keep
|
||||||
import com.jayway.jsonpath.JsonPath
|
import com.jayway.jsonpath.JsonPath
|
||||||
import com.jayway.jsonpath.ReadContext
|
import com.jayway.jsonpath.ReadContext
|
||||||
|
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@Suppress("RegExpRedundantEscape")
|
@Suppress("RegExpRedundantEscape")
|
||||||
@Keep
|
@Keep
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package io.legado.app.model.analyzeRule
|
package io.legado.app.model.analyzeRule
|
||||||
|
|
||||||
import androidx.annotation.Keep
|
import androidx.annotation.Keep
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
|
@ -7,7 +7,6 @@ import org.jsoup.nodes.Element
|
|||||||
import org.jsoup.select.Elements
|
import org.jsoup.select.Elements
|
||||||
import org.seimicrawler.xpath.JXDocument
|
import org.seimicrawler.xpath.JXDocument
|
||||||
import org.seimicrawler.xpath.JXNode
|
import org.seimicrawler.xpath.JXNode
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
class AnalyzeByXPath(doc: Any) {
|
class AnalyzeByXPath(doc: Any) {
|
||||||
|
@ -15,10 +15,8 @@ import org.jsoup.nodes.Entities
|
|||||||
import org.mozilla.javascript.NativeObject
|
import org.mozilla.javascript.NativeObject
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import javax.script.SimpleBindings
|
import javax.script.SimpleBindings
|
||||||
import kotlin.collections.HashMap
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析规则获取结果
|
* 解析规则获取结果
|
||||||
|
@ -21,10 +21,8 @@ import okhttp3.MediaType.Companion.toMediaType
|
|||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import java.net.URLEncoder
|
import java.net.URLEncoder
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import javax.script.SimpleBindings
|
import javax.script.SimpleBindings
|
||||||
import kotlin.collections.HashMap
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by GKF on 2018/1/24.
|
* Created by GKF on 2018/1/24.
|
||||||
|
@ -23,7 +23,6 @@ import java.io.FileOutputStream
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.nio.charset.Charset
|
import java.nio.charset.Charset
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class EpubFile(var book: Book) {
|
class EpubFile(var book: Book) {
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import android.net.Uri
|
|||||||
import androidx.documentfile.provider.DocumentFile
|
import androidx.documentfile.provider.DocumentFile
|
||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.constant.AppConst
|
import io.legado.app.constant.AppConst
|
||||||
import io.legado.app.constant.AppPattern
|
|
||||||
import io.legado.app.data.appDb
|
import io.legado.app.data.appDb
|
||||||
import io.legado.app.data.entities.Book
|
import io.legado.app.data.entities.Book
|
||||||
import io.legado.app.data.entities.BookChapter
|
import io.legado.app.data.entities.BookChapter
|
||||||
|
@ -11,7 +11,6 @@ import splitties.init.appCtx
|
|||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class UmdFile(var book: Book) {
|
class UmdFile(var book: Book) {
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -23,7 +23,6 @@ import kotlinx.coroutines.Dispatchers.IO
|
|||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
|
class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ import io.legado.app.utils.showDialogFragment
|
|||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ import io.legado.app.databinding.ItemArrangeBookBinding
|
|||||||
import io.legado.app.lib.theme.backgroundColor
|
import io.legado.app.lib.theme.backgroundColor
|
||||||
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper
|
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper
|
||||||
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class ArrangeBookAdapter(context: Context, val callBack: CallBack) :
|
class ArrangeBookAdapter(context: Context, val callBack: CallBack) :
|
||||||
RecyclerAdapter<Book, ItemArrangeBookBinding>(context),
|
RecyclerAdapter<Book, ItemArrangeBookBinding>(context),
|
||||||
|
@ -31,7 +31,6 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ import io.legado.app.ui.book.source.manage.BookSourceActivity
|
|||||||
import io.legado.app.ui.widget.recycler.VerticalDivider
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ import io.legado.app.utils.setLayout
|
|||||||
import io.legado.app.utils.showDialogFragment
|
import io.legado.app.utils.showDialogFragment
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import io.legado.app.utils.visible
|
import io.legado.app.utils.visible
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ import io.legado.app.utils.applyTint
|
|||||||
import io.legado.app.utils.setLayout
|
import io.legado.app.utils.setLayout
|
||||||
import io.legado.app.utils.showDialogFragment
|
import io.legado.app.utils.showDialogFragment
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import io.legado.app.utils.*
|
|||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -10,7 +10,6 @@ import io.legado.app.utils.FileDoc
|
|||||||
import io.legado.app.utils.isContentScheme
|
import io.legado.app.utils.isContentScheme
|
||||||
import io.legado.app.utils.toastOnUi
|
import io.legado.app.utils.toastOnUi
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
class ImportBookViewModel(application: Application) : BaseViewModel(application) {
|
class ImportBookViewModel(application: Application) : BaseViewModel(application) {
|
||||||
|
@ -25,7 +25,6 @@ import io.legado.app.utils.setEdgeEffectColor
|
|||||||
import io.legado.app.utils.snackbar
|
import io.legado.app.utils.snackbar
|
||||||
import io.legado.app.utils.splitNotBlank
|
import io.legado.app.utils.splitNotBlank
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class TxtTocRuleActivity : VMBaseActivity<ActivityTxtTocRuleBinding, TxtTocRuleViewModel>(),
|
class TxtTocRuleActivity : VMBaseActivity<ActivityTxtTocRuleBinding, TxtTocRuleViewModel>(),
|
||||||
|
@ -4,8 +4,11 @@ import android.annotation.SuppressLint
|
|||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.*
|
import android.view.Gravity
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
|
import android.view.WindowInsets
|
||||||
|
import android.view.WindowManager
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
@ -214,7 +217,7 @@ abstract class BaseReadBookActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InflateParams")
|
@SuppressLint("InflateParams", "SetTextI18n")
|
||||||
fun showDownloadDialog() {
|
fun showDownloadDialog() {
|
||||||
ReadBook.book?.let { book ->
|
ReadBook.book?.let { book ->
|
||||||
alert(titleResource = R.string.offline_cache) {
|
alert(titleResource = R.string.offline_cache) {
|
||||||
|
@ -11,12 +11,17 @@ import android.widget.FrameLayout
|
|||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.databinding.ViewSearchMenuBinding
|
import io.legado.app.databinding.ViewSearchMenuBinding
|
||||||
import io.legado.app.help.*
|
import io.legado.app.help.ReadBookConfig
|
||||||
import io.legado.app.lib.theme.*
|
import io.legado.app.lib.theme.Selector
|
||||||
|
import io.legado.app.lib.theme.bottomBackground
|
||||||
|
import io.legado.app.lib.theme.getPrimaryTextColor
|
||||||
import io.legado.app.model.ReadBook
|
import io.legado.app.model.ReadBook
|
||||||
import io.legado.app.ui.book.searchContent.SearchResult
|
import io.legado.app.ui.book.searchContent.SearchResult
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import splitties.views.*
|
import splitties.views.bottomPadding
|
||||||
|
import splitties.views.leftPadding
|
||||||
|
import splitties.views.padding
|
||||||
|
import splitties.views.rightPadding
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索界面菜单
|
* 搜索界面菜单
|
||||||
|
@ -7,7 +7,10 @@ import io.legado.app.data.appDb
|
|||||||
import io.legado.app.data.entities.HttpTTS
|
import io.legado.app.data.entities.HttpTTS
|
||||||
import io.legado.app.model.NoStackTraceException
|
import io.legado.app.model.NoStackTraceException
|
||||||
import io.legado.app.model.ReadAloud
|
import io.legado.app.model.ReadAloud
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.getClipText
|
||||||
|
import io.legado.app.utils.isJsonArray
|
||||||
|
import io.legado.app.utils.isJsonObject
|
||||||
|
import io.legado.app.utils.toastOnUi
|
||||||
|
|
||||||
class HttpTtsEditViewModel(app: Application) : BaseViewModel(app) {
|
class HttpTtsEditViewModel(app: Application) : BaseViewModel(app) {
|
||||||
|
|
||||||
|
@ -28,10 +28,10 @@ import io.legado.app.lib.theme.primaryTextColor
|
|||||||
import io.legado.app.model.CheckSource
|
import io.legado.app.model.CheckSource
|
||||||
import io.legado.app.model.Debug
|
import io.legado.app.model.Debug
|
||||||
import io.legado.app.ui.association.ImportBookSourceDialog
|
import io.legado.app.ui.association.ImportBookSourceDialog
|
||||||
import io.legado.app.ui.config.CheckSourceConfig
|
|
||||||
import io.legado.app.ui.book.local.rule.TxtTocRuleActivity
|
import io.legado.app.ui.book.local.rule.TxtTocRuleActivity
|
||||||
import io.legado.app.ui.book.source.debug.BookSourceDebugActivity
|
import io.legado.app.ui.book.source.debug.BookSourceDebugActivity
|
||||||
import io.legado.app.ui.book.source.edit.BookSourceEditActivity
|
import io.legado.app.ui.book.source.edit.BookSourceEditActivity
|
||||||
|
import io.legado.app.ui.config.CheckSourceConfig
|
||||||
import io.legado.app.ui.document.HandleFileContract
|
import io.legado.app.ui.document.HandleFileContract
|
||||||
import io.legado.app.ui.qrcode.QrCodeResult
|
import io.legado.app.ui.qrcode.QrCodeResult
|
||||||
import io.legado.app.ui.widget.SelectActionBar
|
import io.legado.app.ui.widget.SelectActionBar
|
||||||
|
@ -27,7 +27,6 @@ import io.legado.app.utils.requestInputMethod
|
|||||||
import io.legado.app.utils.setLayout
|
import io.legado.app.utils.setLayout
|
||||||
import io.legado.app.utils.splitNotBlank
|
import io.legado.app.utils.splitNotBlank
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.base.BaseDialogFragment
|
import io.legado.app.base.BaseDialogFragment
|
||||||
|
import io.legado.app.constant.PreferKey
|
||||||
import io.legado.app.databinding.DialogCheckSourceConfigBinding
|
import io.legado.app.databinding.DialogCheckSourceConfigBinding
|
||||||
import io.legado.app.lib.theme.primaryColor
|
import io.legado.app.lib.theme.primaryColor
|
||||||
import io.legado.app.model.CheckSource
|
import io.legado.app.model.CheckSource
|
||||||
|
import io.legado.app.utils.putPrefString
|
||||||
import io.legado.app.utils.setLayout
|
import io.legado.app.utils.setLayout
|
||||||
import io.legado.app.utils.toastOnUi
|
import io.legado.app.utils.toastOnUi
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import splitties.views.onClick
|
import splitties.views.onClick
|
||||||
import io.legado.app.constant.PreferKey
|
|
||||||
import io.legado.app.utils.putPrefString
|
|
||||||
|
|
||||||
class CheckSourceConfig : BaseDialogFragment(R.layout.dialog_check_source_config) {
|
class CheckSourceConfig : BaseDialogFragment(R.layout.dialog_check_source_config) {
|
||||||
|
|
||||||
|
@ -12,12 +12,12 @@ import io.legado.app.R
|
|||||||
import io.legado.app.base.BasePreferenceFragment
|
import io.legado.app.base.BasePreferenceFragment
|
||||||
import io.legado.app.constant.EventBus
|
import io.legado.app.constant.EventBus
|
||||||
import io.legado.app.constant.PreferKey
|
import io.legado.app.constant.PreferKey
|
||||||
import io.legado.app.model.CheckSource
|
|
||||||
import io.legado.app.databinding.DialogEditTextBinding
|
import io.legado.app.databinding.DialogEditTextBinding
|
||||||
import io.legado.app.help.AppConfig
|
import io.legado.app.help.AppConfig
|
||||||
import io.legado.app.help.BookHelp
|
import io.legado.app.help.BookHelp
|
||||||
import io.legado.app.lib.dialogs.alert
|
import io.legado.app.lib.dialogs.alert
|
||||||
import io.legado.app.lib.theme.primaryColor
|
import io.legado.app.lib.theme.primaryColor
|
||||||
|
import io.legado.app.model.CheckSource
|
||||||
import io.legado.app.receiver.SharedReceiverActivity
|
import io.legado.app.receiver.SharedReceiverActivity
|
||||||
import io.legado.app.service.WebService
|
import io.legado.app.service.WebService
|
||||||
import io.legado.app.ui.document.HandleFileContract
|
import io.legado.app.ui.document.HandleFileContract
|
||||||
|
@ -14,7 +14,6 @@ import io.legado.app.ui.document.utils.FilePickerIcon
|
|||||||
import io.legado.app.utils.ConvertUtils
|
import io.legado.app.utils.ConvertUtils
|
||||||
import io.legado.app.utils.FileUtils
|
import io.legado.app.utils.FileUtils
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
class FileAdapter(context: Context, val callBack: CallBack) :
|
class FileAdapter(context: Context, val callBack: CallBack) :
|
||||||
|
@ -3,7 +3,6 @@ package io.legado.app.ui.document.entity
|
|||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
import java.lang.reflect.Field
|
import java.lang.reflect.Field
|
||||||
import java.lang.reflect.Modifier
|
import java.lang.reflect.Modifier
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JavaBean类
|
* JavaBean类
|
||||||
|
@ -23,8 +23,6 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
|||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
|
||||||
import kotlin.collections.ArrayList
|
|
||||||
|
|
||||||
class FontSelectDialog : BaseDialogFragment(R.layout.dialog_font_select),
|
class FontSelectDialog : BaseDialogFragment(R.layout.dialog_font_select),
|
||||||
Toolbar.OnMenuItemClickListener,
|
Toolbar.OnMenuItemClickListener,
|
||||||
|
@ -27,7 +27,6 @@ import io.legado.app.ui.main.MainViewModel
|
|||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ import io.legado.app.ui.main.bookshelf.BaseBookshelfFragment
|
|||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import io.legado.app.utils.*
|
|||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,6 @@ import io.legado.app.ui.rss.subscription.RuleSubActivity
|
|||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,9 +22,11 @@ import io.legado.app.lib.dialogs.alert
|
|||||||
import io.legado.app.lib.theme.backgroundColor
|
import io.legado.app.lib.theme.backgroundColor
|
||||||
import io.legado.app.lib.theme.primaryColor
|
import io.legado.app.lib.theme.primaryColor
|
||||||
import io.legado.app.ui.widget.recycler.VerticalDivider
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.applyTint
|
||||||
|
import io.legado.app.utils.requestInputMethod
|
||||||
|
import io.legado.app.utils.setLayout
|
||||||
|
import io.legado.app.utils.splitNotBlank
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ import io.legado.app.ui.widget.recycler.VerticalDivider
|
|||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,8 +18,6 @@ import io.legado.app.ui.widget.recycler.DragSelectTouchHelper
|
|||||||
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
||||||
import io.legado.app.utils.ColorUtils
|
import io.legado.app.utils.ColorUtils
|
||||||
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
|
class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
|
||||||
RecyclerAdapter<ReplaceRule, ItemReplaceRuleBinding>(context),
|
RecyclerAdapter<ReplaceRule, ItemReplaceRuleBinding>(context),
|
||||||
|
@ -24,7 +24,6 @@ import io.legado.app.utils.setEdgeEffectColor
|
|||||||
import io.legado.app.utils.startActivity
|
import io.legado.app.utils.startActivity
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class RssArticlesFragment() : VMBaseFragment<RssArticlesViewModel>(R.layout.fragment_rss_articles),
|
class RssArticlesFragment() : VMBaseFragment<RssArticlesViewModel>(R.layout.fragment_rss_articles),
|
||||||
|
@ -10,7 +10,6 @@ import io.legado.app.ui.rss.read.ReadRssActivity
|
|||||||
import io.legado.app.ui.widget.recycler.VerticalDivider
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
||||||
import io.legado.app.utils.startActivity
|
import io.legado.app.utils.startActivity
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ import io.legado.app.lib.theme.primaryColor
|
|||||||
import io.legado.app.ui.widget.recycler.VerticalDivider
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ import io.legado.app.ui.widget.recycler.VerticalDivider
|
|||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,6 @@ import io.legado.app.utils.showDialogFragment
|
|||||||
import io.legado.app.utils.toastOnUi
|
import io.legado.app.utils.toastOnUi
|
||||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.flow.collect
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
@ -7,7 +7,10 @@ import io.legado.app.help.AppConfig
|
|||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.logging.*
|
import java.util.logging.FileHandler
|
||||||
|
import java.util.logging.Level
|
||||||
|
import java.util.logging.LogRecord
|
||||||
|
import java.util.logging.Logger
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
@ -10,7 +10,6 @@ import androidx.core.view.forEach
|
|||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.constant.Theme
|
import io.legado.app.constant.Theme
|
||||||
import java.lang.reflect.Method
|
import java.lang.reflect.Method
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@SuppressLint("RestrictedApi")
|
@SuppressLint("RestrictedApi")
|
||||||
fun Menu.applyTint(context: Context, theme: Theme = Theme.Auto): Menu = this.let { menu ->
|
fun Menu.applyTint(context: Context, theme: Theme = Theme.Auto): Menu = this.let { menu ->
|
||||||
|
@ -4,7 +4,6 @@ import kotlinx.coroutines.Dispatchers.IO
|
|||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.io.*
|
import java.io.*
|
||||||
import java.util.*
|
|
||||||
import java.util.zip.ZipEntry
|
import java.util.zip.ZipEntry
|
||||||
import java.util.zip.ZipFile
|
import java.util.zip.ZipFile
|
||||||
import java.util.zip.ZipOutputStream
|
import java.util.zip.ZipOutputStream
|
||||||
|
@ -10,7 +10,6 @@ import io.legado.app.api.controller.RssSourceController
|
|||||||
import io.legado.app.web.utils.AssetsWeb
|
import io.legado.app.web.utils.AssetsWeb
|
||||||
import java.io.ByteArrayInputStream
|
import java.io.ByteArrayInputStream
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
class HttpServer(port: Int) : NanoHTTPD(port) {
|
class HttpServer(port: Int) : NanoHTTPD(port) {
|
||||||
|
@ -6,7 +6,10 @@ import fi.iki.elonen.NanoWSD
|
|||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.data.appDb
|
import io.legado.app.data.appDb
|
||||||
import io.legado.app.model.Debug
|
import io.legado.app.model.Debug
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.GSON
|
||||||
|
import io.legado.app.utils.fromJsonObject
|
||||||
|
import io.legado.app.utils.isJson
|
||||||
|
import io.legado.app.utils.runOnIO
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
|
@ -6,7 +6,10 @@ import fi.iki.elonen.NanoWSD
|
|||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.data.appDb
|
import io.legado.app.data.appDb
|
||||||
import io.legado.app.model.Debug
|
import io.legado.app.model.Debug
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.GSON
|
||||||
|
import io.legado.app.utils.fromJsonObject
|
||||||
|
import io.legado.app.utils.isJson
|
||||||
|
import io.legado.app.utils.runOnIO
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
|
Loading…
Reference in New Issue
Block a user