Added rule option to delete keywords

This commit is contained in:
M66B
2023-03-13 17:31:44 +01:00
parent 60bbea131a
commit 4136a5b3e6
5 changed files with 38 additions and 4 deletions

View File

@@ -199,7 +199,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
setAction(getAction(type), value);
} else if (type == EntityRule.TYPE_KEYWORD) {
setAction(getAction(type), jaction.optString("keyword"));
boolean set = jaction.optBoolean("set", true);
setAction(getAction(type), (set ? "+" : "-") + jaction.optString("keyword"));
} else if (type == EntityRule.TYPE_ANSWER) {
to = jaction.optString("to");
if (!TextUtils.isEmpty(to)) {