Modify remove "replace" method's param name statement

This commit is contained in:
2023-01-13 23:20:26 +08:00
parent e465739f95
commit 0fd1a33533
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ class ConfigActivity : BaseActivity<ActivityConfigBinding>() {
/** 替换占位符到当前 APP 名称 */
private fun TextView.replaceToAppName() {
text = text.toString().replace(oldValue = "{APP_NAME}", appName)
text = text.toString().replace("{APP_NAME}", appName)
}
/** 重新设置 DPI 防止 QQ、TIM 修改它 */

View File

@@ -121,7 +121,7 @@ object GithubReleaseTool {
* 格式化时间为本地时区
* @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 {
val local = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).apply { timeZone = Calendar.getInstance().timeZone }
val current = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }