Modify remove "contains", "replace" method's param name statement

This commit is contained in:
2023-01-14 01:22:16 +08:00
parent 2c0cfb6863
commit 211343a6e7
3 changed files with 3 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ data class AppErrorsInfoBean(
isNativeCrash = isNativeCrash,
exceptionClassName = crashInfo?.exceptionClassName ?: "unknown",
exceptionMessage = if (isNativeCrash) crashInfo?.stackTrace.let {
if (it?.contains(other = "Abort message: '") == true)
if (it?.contains("Abort message: '") == true)
runCatching { it.split("Abort message: '")[1].split("'")[0] }.getOrNull()
?: crashInfo?.exceptionMessage ?: "unknown"
else crashInfo?.exceptionMessage ?: "unknown"

View File

@@ -167,7 +167,7 @@ class LoggerActivity : BaseActivity<ActivitiyLoggerBinding>() {
* 格式化消息字符串样式
* @return [String]
*/
private fun String.format() = replace(oldValue = "--", newValue = "\n--")
private fun String.format() = replace("--", "\n--")
/**
* 获取完整的异常堆栈内容

View File

@@ -193,7 +193,7 @@ class AppErrorsRecordActivity : BaseActivity<ActivityAppErrorsRecordBinding>() {
* @return [String]
*/
private fun String.simpleThwName() =
let { text -> if (text.contains(other = ".")) text.split(".").let { e -> e[e.lastIndex] } else text }
let { text -> if (text.contains(".")) text.split(".").let { e -> e[e.lastIndex] } else text }
override fun onCreateContextMenu(menu: ContextMenu?, v: View?, menuInfo: ContextMenu.ContextMenuInfo?) {
menuInflater.inflate(R.menu.menu_list_detail_action, menu)