mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-31 07:10:14 -05:00
Add a fromMe method on messages
This commit is contained in:
parent
f1d985dc2b
commit
0c34a21ff0
@ -146,6 +146,7 @@ public abstract class Message implements Part, Body {
|
||||
public abstract boolean toMe();
|
||||
public abstract boolean ccMe();
|
||||
public abstract boolean bccMe();
|
||||
public abstract boolean fromMe();
|
||||
public abstract long getId();
|
||||
|
||||
public abstract String getPreview();
|
||||
|
@ -605,6 +605,10 @@ public class MimeMessage extends Message {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean fromMe() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return Long.parseLong(mUid); //or maybe .mMessageId?
|
||||
}
|
||||
|
@ -2919,8 +2919,13 @@ public class LocalStore extends Store implements Serializable {
|
||||
|
||||
private boolean mToMeCalculated = false;
|
||||
private boolean mCcMeCalculated = false;
|
||||
private boolean mFromMeCalculated = false;
|
||||
private boolean mToMe = false;
|
||||
private boolean mCcMe = false;
|
||||
private boolean mFromMe = false;
|
||||
|
||||
|
||||
|
||||
|
||||
private boolean mHeadersLoaded = false;
|
||||
private boolean mMessageDirty = false;
|
||||
@ -3118,6 +3123,16 @@ public class LocalStore extends Store implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
public boolean fromMe() {
|
||||
if (!mFromMeCalculated) {
|
||||
if (mAccount.isAnIdentity(getFrom())) {
|
||||
mFromMe = true;
|
||||
mFromMeCalculated = true;
|
||||
}
|
||||
}
|
||||
return mFromMe;
|
||||
}
|
||||
|
||||
|
||||
public boolean toMe() {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user