Small behavior improvement

pull/178/head
M66B 5 years ago
parent ec65449ef6
commit 23d1517725

@ -2409,6 +2409,11 @@ class Core {
update = true; update = true;
message.hash = helper.getHash(); message.hash = helper.getHash();
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " hash=" + message.hash); Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " hash=" + message.hash);
// Update archive to prevent visible > 1
if (EntityFolder.DRAFTS.equals(folder.type))
for (EntityMessage dup : db.message().getMessagesByMsgId(message.account, message.msgid))
db.message().setMessageHash(dup.id, message.hash);
} }
if (message.ui_hide && if (message.ui_hide &&

@ -504,6 +504,9 @@ public interface DaoMessage {
@Query("UPDATE message SET msgid = :msgid WHERE id = :id") @Query("UPDATE message SET msgid = :msgid WHERE id = :id")
int setMessageMsgId(long id, String msgid); int setMessageMsgId(long id, String msgid);
@Query("UPDATE message SET hash = :hash WHERE id = :id")
int setMessageHash(long id, String hash);
@Query("UPDATE message SET priority = :priority WHERE id = :id") @Query("UPDATE message SET priority = :priority WHERE id = :id")
int setMessagePriority(long id, Integer priority); int setMessagePriority(long id, Integer priority);

Loading…
Cancel
Save