mirror of https://github.com/M66B/FairEmail.git
Prevent duplicate warnings
This commit is contained in:
parent
7d4564a4fb
commit
1353013f65
|
@ -4065,8 +4065,17 @@ public class MessageHelper {
|
|||
}
|
||||
|
||||
String getWarnings(String existing) {
|
||||
if (existing != null)
|
||||
warnings.add(0, existing);
|
||||
if (existing != null) {
|
||||
boolean exists = false;
|
||||
for (String warning : warnings)
|
||||
if (existing.equals(warning)) {
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
if (!exists)
|
||||
warnings.add(0, existing);
|
||||
}
|
||||
|
||||
if (warnings.size() == 0)
|
||||
return null;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue