接口返回数据错乱容错。

This commit is contained in:
2025-11-24 16:07:59 +08:00
parent 6edd0ed339
commit a1e123f0bf
2 changed files with 5 additions and 3 deletions

View File

@@ -52,8 +52,10 @@ class HeartCpActivity : BaseMvpActivity<HeartCpPresenter, ActivityHeartCpBinding
}
mBinding.ivHelp.setOnClickListener {
val dialog = DialogWebView(this)
dialog.show(CommonAppContext.getInstance()
.getCurrentEnvironment().serverUrl + "api/Page/page_show?id=31")
dialog.show(
CommonAppContext.getInstance().currentEnvironment.serverUrl
+ "api/Page/page_show?id=31"
)
}
mBinding.ivHeadLeft.setOnClickListener {

View File

@@ -36,7 +36,7 @@ class ItemCpHeartAdapter(
tv.setTextColor(context.getColor(R.color.ff4a89ff))
R.color.ffff53cc
}
if (item.remark.contains(item.to_user_info.nickname)) {
if (item.remark.contains(item.to_user_info.nickname) && item.to_user_info.nickname.isNotEmpty()) {
val builder = getContentColor(item.to_user_info.nickname, item.remark, cid)
helper.setText(R.id.tv_content, builder)
} else {