Added rule action GET URL

This commit is contained in:
M66B
2023-10-02 18:45:50 +02:00
parent 2d07650db8
commit 97be480046
6 changed files with 90 additions and 5 deletions

View File

@@ -225,6 +225,9 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
} else if (type == EntityRule.TYPE_NOTES) {
String notes = jaction.getString("notes");
setAction(getAction(type), notes);
} else if (type == EntityRule.TYPE_URL) {
String url = jaction.getString("url");
setAction(getAction(type), url);
} else
setAction(getAction(type), null);
@@ -577,6 +580,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
return R.string.title_rule_local_only;
case EntityRule.TYPE_NOTES:
return R.string.title_rule_notes;
case EntityRule.TYPE_URL:
return R.string.title_rule_url;
default:
throw new IllegalArgumentException("Unknown action type=" + type);
}