From 609ad4e6a01875f6b689fecbf40bcfc60a8990d8 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 28 May 2024 15:27:00 +0200 Subject: [PATCH] Fixed sorting of SRV records on priority --- app/src/main/java/eu/faircode/email/EmailProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index 912ed6d468..7542517b27 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -1038,7 +1038,7 @@ public class EmailProvider implements Parcelable { Collections.sort(list, new Comparator() { @Override public int compare(DnsHelper.DnsRecord d1, DnsHelper.DnsRecord d2) { - int p = -Integer.compare(d1.priority, d2.priority); + int p = Integer.compare(d1.priority, d2.priority); if (p != 0) return p; int w = -Integer.compare(d1.weight, d2.weight); @@ -1076,7 +1076,7 @@ public class EmailProvider implements Parcelable { Collections.sort(list, new Comparator() { @Override public int compare(DnsHelper.DnsRecord d1, DnsHelper.DnsRecord d2) { - int p = -Integer.compare(d1.priority, d2.priority); + int p = Integer.compare(d1.priority, d2.priority); if (p != 0) return p; int w = -Integer.compare(d1.weight, d2.weight);