mirror of https://github.com/M66B/FairEmail.git
Keep recently stored messages
This commit is contained in:
parent
6648169757
commit
4a01010408
|
@ -798,7 +798,7 @@ public interface DaoMessage {
|
||||||
" AND NOT uid IS NULL" +
|
" AND NOT uid IS NULL" +
|
||||||
" AND (ui_seen OR :unseen)" +
|
" AND (ui_seen OR :unseen)" +
|
||||||
" AND NOT ui_flagged" +
|
" AND NOT ui_flagged" +
|
||||||
" AND (NOT ui_browsed OR stored < :before)" +
|
" AND stored < :before" + // moved, browsed
|
||||||
" AND ui_snoozed IS NULL")
|
" AND ui_snoozed IS NULL")
|
||||||
int deleteMessagesBefore(long folder, long before, boolean unseen);
|
int deleteMessagesBefore(long folder, long before, boolean unseen);
|
||||||
}
|
}
|
|
@ -238,6 +238,7 @@ public class EntityOperation {
|
||||||
Long identity = message.identity;
|
Long identity = message.identity;
|
||||||
long uid = message.uid;
|
long uid = message.uid;
|
||||||
Boolean raw = message.raw;
|
Boolean raw = message.raw;
|
||||||
|
Long stored = message.stored;
|
||||||
int notifying = message.notifying;
|
int notifying = message.notifying;
|
||||||
boolean fts = message.fts;
|
boolean fts = message.fts;
|
||||||
Integer importance = message.importance;
|
Integer importance = message.importance;
|
||||||
|
@ -256,6 +257,7 @@ public class EntityOperation {
|
||||||
message.identity = null;
|
message.identity = null;
|
||||||
message.uid = null;
|
message.uid = null;
|
||||||
message.raw = null;
|
message.raw = null;
|
||||||
|
message.stored = new Date().getTime();
|
||||||
message.notifying = 0;
|
message.notifying = 0;
|
||||||
message.fts = false;
|
message.fts = false;
|
||||||
if (reset_importance)
|
if (reset_importance)
|
||||||
|
@ -273,6 +275,7 @@ public class EntityOperation {
|
||||||
message.ui_browsed = false;
|
message.ui_browsed = false;
|
||||||
message.error = null;
|
message.error = null;
|
||||||
message.id = db.message().insertMessage(message);
|
message.id = db.message().insertMessage(message);
|
||||||
|
|
||||||
File mtarget = message.getFile(context);
|
File mtarget = message.getFile(context);
|
||||||
long tmpid = message.id;
|
long tmpid = message.id;
|
||||||
jargs.put(2, tmpid);
|
jargs.put(2, tmpid);
|
||||||
|
@ -283,6 +286,7 @@ public class EntityOperation {
|
||||||
message.identity = identity;
|
message.identity = identity;
|
||||||
message.uid = uid;
|
message.uid = uid;
|
||||||
message.raw = raw;
|
message.raw = raw;
|
||||||
|
message.stored = stored;
|
||||||
message.notifying = notifying;
|
message.notifying = notifying;
|
||||||
message.fts = fts;
|
message.fts = fts;
|
||||||
message.importance = importance;
|
message.importance = importance;
|
||||||
|
|
Loading…
Reference in New Issue