mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Compare email address only of submitter
This commit is contained in:
parent
5d6b71dff6
commit
7edf30016e
2 changed files with 19 additions and 2 deletions
|
@ -2163,7 +2163,7 @@ class Core {
|
|||
message.ui_ignored = false;
|
||||
message.ui_browsed = false;
|
||||
|
||||
if (MessageHelper.equal(message.submitter, message.from))
|
||||
if (MessageHelper.equalEmail(message.submitter, message.from))
|
||||
message.submitter = null;
|
||||
|
||||
if (message.size == null && message.total != null)
|
||||
|
@ -2863,7 +2863,7 @@ class Core {
|
|||
if (message.flagged)
|
||||
message.color = color;
|
||||
|
||||
if (MessageHelper.equal(message.submitter, message.from))
|
||||
if (MessageHelper.equalEmail(message.submitter, message.from))
|
||||
message.submitter = null;
|
||||
|
||||
// Borrow reply name from sender name
|
||||
|
|
|
@ -2707,6 +2707,23 @@ public class MessageHelper {
|
|||
return Objects.equals(email1, email2);
|
||||
}
|
||||
|
||||
static boolean equalEmail(Address[] a1, Address[] a2) {
|
||||
if (a1 == null && a2 == null)
|
||||
return true;
|
||||
|
||||
if (a1 == null || a2 == null)
|
||||
return false;
|
||||
|
||||
if (a1.length != a2.length)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < a1.length; i++)
|
||||
if (!equalEmail(a1[i], a2[i]))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static boolean equal(Address[] a1, Address[] a2) {
|
||||
if (a1 == null && a2 == null)
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue