blongho / worldCountryData

Android library for country flag, currency, and other country information
https://blongho.github.io/worldCountryData/doc/
MIT License
98 stars 35 forks source link

Countries without currency symbol won't get loaded #29

Closed sal0max closed 2 years ago

sal0max commented 3 years ago

Describe the bug Countries like Guernsey (alpha2: GG) won't load correctly at all. E.g. the world flag will be returned, instead of its own flag, which is included in this library.

The cause is this: All those countries don't contain a symbol in com_blongho_country_data_currencies.json: HK, AN, TP, ID, PF, NC, WF, GI, MO, TM, AQ, GH, GG, MO, MF

When initiating the countries, the isValid(final Currency currency) method returns false in those cases, as currency.getSymbol() != null is checked.

This pull requests fixes this issue by removing that single check. You can also deny this request, keep the check and add a symbol to the mentioned elements in the json file.

I'm fine with either. 👍

github-actions[bot] commented 3 years ago

Staled pull request

blongho commented 2 years ago

Now fixed