mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Show rule absolute time in list
This commit is contained in:
parent
5137772fa0
commit
6d8824c7ca
1 changed files with 10 additions and 2 deletions
|
@ -164,9 +164,17 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
conditions.add(new Condition(context.getString(R.string.title_rule_body),
|
||||
jcondition.getJSONObject("body").optString("value"),
|
||||
jcondition.getJSONObject("body").optBoolean("regex")));
|
||||
if (jcondition.has("date"))
|
||||
if (jcondition.has("date")) {
|
||||
String range = null;
|
||||
JSONObject jdate = jcondition.optJSONObject("date");
|
||||
if (jdate != null && jdate.has("after") && jdate.has("before")) {
|
||||
long after = jdate.getLong("after");
|
||||
long before = jdate.getLong("before");
|
||||
range = DF.format(after) + " - " + DF.format(before);
|
||||
}
|
||||
conditions.add(new Condition(context.getString(R.string.title_rule_time_abs),
|
||||
null, null));
|
||||
range, null));
|
||||
}
|
||||
if (jcondition.has("schedule")) {
|
||||
String range = null;
|
||||
JSONObject jschedule = jcondition.optJSONObject("schedule");
|
||||
|
|
Loading…
Reference in a new issue