Show rule action forward address

pull/207/head
M66B 4 years ago
parent cbf626ac86
commit 200ff5b51c

@ -166,6 +166,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
try { try {
JSONObject jaction = new JSONObject(rule.action); JSONObject jaction = new JSONObject(rule.action);
String to = null;
int type = jaction.getInt("type"); int type = jaction.getInt("type");
if (type == EntityRule.TYPE_SNOOZE) { if (type == EntityRule.TYPE_SNOOZE) {
int duration = jaction.optInt("duration", 0); int duration = jaction.optInt("duration", 0);
@ -184,12 +186,15 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
setAction(type, value); setAction(type, value);
} else if (type == EntityRule.TYPE_KEYWORD) { } else if (type == EntityRule.TYPE_KEYWORD) {
setAction(type, jaction.optString("keyword")); setAction(type, jaction.optString("keyword"));
} else if (type == EntityRule.TYPE_ANSWER) {
to = jaction.optString("to");
if (!TextUtils.isEmpty(to))
setAction(type, to);
} else } else
setAction(type, null); setAction(type, null);
if (type == EntityRule.TYPE_ANSWER || if (type == EntityRule.TYPE_MOVE || type == EntityRule.TYPE_COPY ||
type == EntityRule.TYPE_MOVE || (type == EntityRule.TYPE_ANSWER && TextUtils.isEmpty(to))) {
type == EntityRule.TYPE_COPY) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLong("id", rule.id); args.putLong("id", rule.id);
args.putInt("type", type); args.putInt("type", type);

Loading…
Cancel
Save