mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Use MOVE again, refactored compose message, find by message ID
This commit is contained in:
@@ -45,6 +45,7 @@ import static androidx.room.ForeignKey.CASCADE;
|
||||
@Index(value = {"identity"}),
|
||||
@Index(value = {"replying"}),
|
||||
@Index(value = {"folder", "uid"}, unique = true),
|
||||
@Index(value = {"msgid"}, unique = true),
|
||||
@Index(value = {"thread"}),
|
||||
@Index(value = {"received"}),
|
||||
@Index(value = {"ui_seen"}),
|
||||
@@ -84,6 +85,17 @@ public class EntityMessage {
|
||||
public Boolean ui_hide;
|
||||
public String error;
|
||||
|
||||
String generateMessageId() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append('<')
|
||||
.append(id).append('.')
|
||||
.append(BuildConfig.APPLICATION_ID).append('.')
|
||||
.append(System.currentTimeMillis()).append('.')
|
||||
.append("anonymous@localhost")
|
||||
.append('>');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof EntityMessage) {
|
||||
|
||||
Reference in New Issue
Block a user