From d194145c8e123e62ebfdac3b361facfc3dafdc3b Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 8 Sep 2019 10:58:51 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt index e6a43ba79..49f01a828 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt @@ -51,7 +51,12 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) : with(holder.itemView) { if (payloads.isEmpty()) { this.setBackgroundColor(context.backgroundColor) - cb_name.text = item.name + if (item.group.isNullOrEmpty()) { + cb_name.text = item.name + } else { + cb_name.text = + String.format("%s (%s)", item.name, item.group) + } swt_enabled.isChecked = item.isEnabled swt_enabled.onClick { item.isEnabled = swt_enabled.isChecked