pull/209/head
M66B 2 years ago
parent 76052e1560
commit a72b72d3f7

@ -2929,7 +2929,7 @@ class Core {
MessageHelper helper = new MessageHelper((MimeMessage) imessages[imessages.length - 1], context); MessageHelper helper = new MessageHelper((MimeMessage) imessages[imessages.length - 1], context);
String msgid = helper.getMessageID(); String msgid = helper.getMessageID();
if (msgid != null) { if (msgid != null) {
int count = db.message().countMessageByMsgId(folder.id, msgid); int count = db.message().countMessageByMsgId(folder.id, msgid, true);
if (count == 1) { if (count == 1) {
Log.i(account.name + " POP having last msgid=" + msgid); Log.i(account.name + " POP having last msgid=" + msgid);
sync = false; sync = false;

@ -452,8 +452,9 @@ public interface DaoMessage {
@Query("SELECT COUNT(*) FROM message" + @Query("SELECT COUNT(*) FROM message" +
" WHERE folder = :folder" + " WHERE folder = :folder" +
" AND msgid = :msgid") " AND msgid = :msgid" +
int countMessageByMsgId(long folder, String msgid); " AND (:hidden OR NOT message.ui_hide)")
int countMessageByMsgId(long folder, String msgid, boolean hidden);
@Query("SELECT COUNT(*) FROM message" + @Query("SELECT COUNT(*) FROM message" +
" JOIN folder_view AS folder ON folder.id = message.folder" + " JOIN folder_view AS folder ON folder.id = message.folder" +

@ -334,7 +334,7 @@ public class EntityOperation {
if (premove && if (premove &&
message.uid != null && message.uid != null &&
!TextUtils.isEmpty(message.msgid) && !TextUtils.isEmpty(message.msgid) &&
db.message().countMessageByMsgId(target.id, message.msgid) == 0) { db.message().countMessageByMsgId(target.id, message.msgid, false) == 0) {
File msource = message.getFile(context); File msource = message.getFile(context);
// Copy message to target folder // Copy message to target folder

Loading…
Cancel
Save