mirror of https://github.com/M66B/FairEmail.git
Collect enabled email addresses only
This commit is contained in:
parent
5fc374d1ac
commit
801143198b
|
@ -1776,12 +1776,23 @@ class Core {
|
||||||
private static void updateContactInfo(Context context, final EntityFolder folder, final EntityMessage message) {
|
private static void updateContactInfo(Context context, final EntityFolder folder, final EntityMessage message) {
|
||||||
final DB db = DB.getInstance(context);
|
final DB db = DB.getInstance(context);
|
||||||
|
|
||||||
if (EntityFolder.ARCHIVE.equals(folder.type) ||
|
if (EntityFolder.DRAFTS.equals(folder.type) ||
|
||||||
|
EntityFolder.ARCHIVE.equals(folder.type) ||
|
||||||
EntityFolder.TRASH.equals(folder.type) ||
|
EntityFolder.TRASH.equals(folder.type) ||
|
||||||
EntityFolder.JUNK.equals(folder.type))
|
EntityFolder.JUNK.equals(folder.type))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
final int type = (folder.isOutgoing() ? EntityContact.TYPE_TO : EntityContact.TYPE_FROM);
|
final int type = (folder.isOutgoing() ? EntityContact.TYPE_TO : EntityContact.TYPE_FROM);
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean suggest_sent = prefs.getBoolean("suggest_sent", false);
|
||||||
|
boolean suggest_received = prefs.getBoolean("suggest_received", false);
|
||||||
|
|
||||||
|
if (type == EntityContact.TYPE_TO && !suggest_sent)
|
||||||
|
return;
|
||||||
|
if (type == EntityContact.TYPE_FROM && !suggest_received)
|
||||||
|
return;
|
||||||
|
|
||||||
Address[] recipients = (type == EntityContact.TYPE_TO
|
Address[] recipients = (type == EntityContact.TYPE_TO
|
||||||
? message.to
|
? message.to
|
||||||
: (message.reply != null ? message.reply : message.from));
|
: (message.reply != null ? message.reply : message.from));
|
||||||
|
|
Loading…
Reference in New Issue