fix bug of log switch

This commit is contained in:
zhongchao
2022-03-02 13:25:02 +08:00
parent f441e5051e
commit 10ff1c2e87
3 changed files with 12 additions and 11 deletions

View File

@@ -393,7 +393,11 @@ class DebugSettingView @JvmOverloads constructor(
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CATCH_LOG, false)
tbLogCatch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
val logCatchTime = etLogCatch.text.toString().toInt()
var logTimeStr = etLogCatch.text?.toString()
if(logTimeStr.isNullOrEmpty()){
logTimeStr = "10"
}
val logCatchTime = logTimeStr.toInt()
if (logCatchTime > 60) {
tbLogCatch.isChecked = false
TipToast.shortTip("最长抓取时间为60分钟")