From 025581bd87504f71d59f7adc07897d0bd1f74c45 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 20 Sep 2019 13:40:14 +0800 Subject: [PATCH] up --- .../java/io/legado/app/constant/AppConst.kt | 50 ++++++------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt index 6cda954e8..58c51fb25 100644 --- a/app/src/main/java/io/legado/app/constant/AppConst.kt +++ b/app/src/main/java/io/legado/app/constant/AppConst.kt @@ -9,50 +9,32 @@ import javax.script.ScriptEngineManager @SuppressLint("SimpleDateFormat") object AppConst { + + const val APP_TAG = "Legado" + const val channelIdDownload = "channel_download" const val channelIdReadAloud = "channel_read_aloud" const val channelIdWeb = "channel_web" - const val APP_TAG = "Legado" - const val RC_IMPORT_YUEDU_DATA = 100 + val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available) - const val userAgent = + val userAgent: String by lazy { "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" + } - val SCRIPT_ENGINE: ScriptEngine = ScriptEngineManager().getEngineByName("rhino") - - val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available) + val SCRIPT_ENGINE: ScriptEngine by lazy { + ScriptEngineManager().getEngineByName("rhino") + } val TIME_FORMAT: SimpleDateFormat by lazy { SimpleDateFormat("HH:mm") } - val keyboardToolChars = arrayListOf( - "@", - "&", - "|", - "%", - "/", - ":", - "[", - "]", - "{", - "}", - "<", - ">", - "\\", - "$", - "#", - "!", - ".", - "href", - "src", - "textNodes", - "xpath", - "json", - "css", - "id", - "class", - "tag" - ) + val keyboardToolChars: List by lazy { + arrayListOf( + "@", "&", "|", "%", "/", ":", "[", "]", "{", "}", "<", ">", + "\\", "$", "#", "!", ".", "href", "src", "textNodes", "xpath", + "json", "css", "id", "class", "tag" + ) + } } \ No newline at end of file