mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-05 18:25:23 +08:00
Modify remove some method's param name statement
This commit is contained in:
@@ -92,7 +92,7 @@ class IconPackParams(private val context: Context? = null, private val param: Pa
|
|||||||
* @return [String] 拼接后的数据
|
* @return [String] 拼接后的数据
|
||||||
*/
|
*/
|
||||||
fun splicingJsonArray(dataJson1: String, dataJson2: String) = safeOf(default = "[]") {
|
fun splicingJsonArray(dataJson1: String, dataJson2: String) = safeOf(default = "[]") {
|
||||||
dataJson1.replace(oldValue = "]", newValue = "") + "," + dataJson2.replace(oldValue = "[", newValue = "")
|
dataJson1.replace("]", "") + "," + dataJson2.replace("[", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,7 +121,7 @@ class IconPackParams(private val context: Context? = null, private val param: Pa
|
|||||||
* @param json 数据
|
* @param json 数据
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
fun isHackString(json: String) = json.contains(other = "Checking your browser before accessing")
|
fun isHackString(json: String) = json.contains("Checking your browser before accessing")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 比较图标数据不相等
|
* 比较图标数据不相等
|
||||||
|
@@ -146,7 +146,7 @@ inline val isNotSupportMiuiVersion get() = !isSupportMiuiVersion
|
|||||||
*/
|
*/
|
||||||
val miuiVersion
|
val miuiVersion
|
||||||
get() = if (isMIUI)
|
get() = if (isMIUI)
|
||||||
findPropString(key = "ro.miui.ui.version.name", default = "V无法获取").let {
|
findPropString("ro.miui.ui.version.name", "V无法获取").let {
|
||||||
when (it) {
|
when (it) {
|
||||||
"V110" -> "11"
|
"V110" -> "11"
|
||||||
"V11" -> "11"
|
"V11" -> "11"
|
||||||
@@ -170,7 +170,7 @@ val miuiVersionCode get() = safeOf(default = 0f) { miuiVersion.toFloat() }
|
|||||||
* 获取 MIUI 次版本号
|
* 获取 MIUI 次版本号
|
||||||
* @return [String]
|
* @return [String]
|
||||||
*/
|
*/
|
||||||
val miuiIncrementalVersion get() = findPropString(key = "ro.system.build.version.incremental").trim()
|
val miuiIncrementalVersion get() = findPropString("ro.system.build.version.incremental").trim()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 MIUI 完全版本
|
* 获取 MIUI 完全版本
|
||||||
|
@@ -120,7 +120,7 @@ object GithubReleaseTool {
|
|||||||
* 格式化时间为本地时区
|
* 格式化时间为本地时区
|
||||||
* @return [String] 本地时区时间
|
* @return [String] 本地时区时间
|
||||||
*/
|
*/
|
||||||
private fun String.localTime() = replace(oldValue = "T", newValue = " ").replace(oldValue = "Z", newValue = "").let {
|
private fun String.localTime() = replace("T", " ").replace("Z", "").let {
|
||||||
runCatching {
|
runCatching {
|
||||||
val local = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).apply { timeZone = Calendar.getInstance().timeZone }
|
val local = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).apply { timeZone = Calendar.getInstance().timeZone }
|
||||||
val current = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }
|
val current = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }
|
||||||
|
Reference in New Issue
Block a user