1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-31 11:31:40 +00:00

Rule snooze relative to message received time

This commit is contained in:
M66B 2019-06-22 13:49:34 +02:00
parent 8762509e80
commit ac8b92f8c0

View file

@ -332,7 +332,7 @@ public class EntityRule {
private void onActionSnooze(Context context, EntityMessage message, JSONObject jargs) throws JSONException { private void onActionSnooze(Context context, EntityMessage message, JSONObject jargs) throws JSONException {
int duration = jargs.getInt("duration"); int duration = jargs.getInt("duration");
long wakeup = new Date().getTime() + duration * 3600 * 1000L; long wakeup = message.received + duration * 3600 * 1000L;
DB db = DB.getInstance(context); DB db = DB.getInstance(context);
db.message().setMessageSnoozed(message.id, wakeup); db.message().setMessageSnoozed(message.id, wakeup);