Commit b6b6af63 authored by Suphon Thanakornpakapong's avatar Suphon Thanakornpakapong
Browse files

Fix weather country detection

parent 9f9e27f9
Pipeline #184178 passed with stage
in 4 minutes and 39 seconds
......@@ -98,11 +98,11 @@ public class CustomLocationPreference extends EditTextPreference
private CharSequence[] buildItemList(List<WeatherLocation> results) {
boolean needCountry = false, needPostal = false;
String countryId = results.get(0).getCountryId();
String firstCountry = results.get(0).getCountry();
HashSet<String> postalIds = new HashSet<>();
for (WeatherLocation result : results) {
if (!TextUtils.equals(result.getCountryId(), countryId)) {
if (!TextUtils.equals(result.getCountry(), firstCountry)) {
needCountry = true;
}
String postalId = result.getCountryId() + "##" + result.getCity();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment