mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-04 09:45:34 +08:00
Modify remove localTime function time second format and change description text in GithubReleaseTool
This commit is contained in:
@@ -102,7 +102,7 @@ object GithubReleaseTool {
|
|||||||
(context as? Activity?)?.runOnUiThread {
|
(context as? Activity?)?.runOnUiThread {
|
||||||
context.showDialog {
|
context.showDialog {
|
||||||
title = "网络不可用"
|
title = "网络不可用"
|
||||||
msg = "模块的联网权限可能已被禁用,请开启联网权限以定期检查更新。"
|
msg = "应用的联网权限可能已被禁用,请开启联网权限以定期检查更新。"
|
||||||
confirmButton(text = "去开启") { context.openSelfSetting() }
|
confirmButton(text = "去开启") { context.openSelfSetting() }
|
||||||
cancelButton()
|
cancelButton()
|
||||||
noCancelable()
|
noCancelable()
|
||||||
@@ -122,8 +122,8 @@ object GithubReleaseTool {
|
|||||||
*/
|
*/
|
||||||
private fun String.localTime() = replace(oldValue = "T", newValue = " ").replace(oldValue = "Z", newValue = "").let {
|
private fun String.localTime() = replace(oldValue = "T", newValue = " ").replace(oldValue = "Z", newValue = "").let {
|
||||||
runCatching {
|
runCatching {
|
||||||
val local = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", 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:ss", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }
|
val current = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }
|
||||||
local.format(current.parse(it))
|
local.format(current.parse(it))
|
||||||
}.getOrNull() ?: it
|
}.getOrNull() ?: it
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user