|
|
|
@ -51,6 +51,7 @@ import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.text.Normalizer;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -1095,11 +1096,17 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|
|
|
|
json.put("in_trash", in_trash);
|
|
|
|
|
json.put("in_junk", in_junk);
|
|
|
|
|
|
|
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
|
|
now.set(Calendar.MILLISECOND, 0);
|
|
|
|
|
now.set(Calendar.SECOND, 0);
|
|
|
|
|
now.set(Calendar.MINUTE, 0);
|
|
|
|
|
now.set(Calendar.HOUR, 0);
|
|
|
|
|
|
|
|
|
|
if (after != null)
|
|
|
|
|
json.put("after", after);
|
|
|
|
|
json.put("after", after - now.getTimeInMillis());
|
|
|
|
|
|
|
|
|
|
if (before != null)
|
|
|
|
|
json.put("before", before);
|
|
|
|
|
json.put("before", before - now.getTimeInMillis());
|
|
|
|
|
|
|
|
|
|
return json;
|
|
|
|
|
}
|
|
|
|
@ -1135,11 +1142,17 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|
|
|
|
criteria.in_trash = json.optBoolean("in_trash");
|
|
|
|
|
criteria.in_junk = json.optBoolean("in_junk");
|
|
|
|
|
|
|
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
|
|
now.set(Calendar.MILLISECOND, 0);
|
|
|
|
|
now.set(Calendar.SECOND, 0);
|
|
|
|
|
now.set(Calendar.MINUTE, 0);
|
|
|
|
|
now.set(Calendar.HOUR, 0);
|
|
|
|
|
|
|
|
|
|
if (json.has("after"))
|
|
|
|
|
criteria.after = json.getLong("after");
|
|
|
|
|
criteria.after = json.getLong("after") + now.getTimeInMillis();
|
|
|
|
|
|
|
|
|
|
if (json.has("before"))
|
|
|
|
|
criteria.before = json.getLong("before");
|
|
|
|
|
criteria.before = json.getLong("before" + now.getTimeInMillis());
|
|
|
|
|
|
|
|
|
|
return criteria;
|
|
|
|
|
}
|
|
|
|
|