mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 23:12:51 +00:00
Improve icon suggestions
Check if the icon issuers contain the token issuer or vice versa. Fixes #761
This commit is contained in:
parent
c27c4f0ac5
commit
acbe73834d
1 changed files with 3 additions and 1 deletions
|
@ -162,8 +162,10 @@ public class IconPack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSuggestedFor(String issuer) {
|
public boolean isSuggestedFor(String issuer) {
|
||||||
|
String lowerIssuer = issuer.toLowerCase();
|
||||||
return getIssuers().stream()
|
return getIssuers().stream()
|
||||||
.anyMatch(is -> is.toLowerCase().contains(issuer.toLowerCase()));
|
.map(String::toLowerCase)
|
||||||
|
.anyMatch(is -> is.contains(lowerIssuer) || lowerIssuer.contains(is));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Icon fromJson(JSONObject obj) throws JSONException {
|
public static Icon fromJson(JSONObject obj) throws JSONException {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue