修复:通道名称太长导致编辑转发规则报错(setSpan (N ... N) ends beyond length 20

This commit is contained in:
pppscn 2022-07-21 09:19:43 +08:00
parent a7746f3b8d
commit 104a7057ed

View File

@ -307,7 +307,8 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
}
for (sender in senderList) {
senderSpinnerList.add(SenderAdapterItem(sender.name, sender.imageId, sender.id, sender.status))
val name = if (sender.name.length > 20) sender.name.substring(0, 19) else sender.name
senderSpinnerList.add(SenderAdapterItem(name, sender.imageId, sender.id, sender.status))
}
senderSpinnerAdapter = SenderSpinnerAdapter(senderSpinnerList)
//.setTextColor(ResUtils.getColor(R.color.green))