Changed isLocalized logic

`isLocalized` will be true when App will contain 1 or more valid locales for this device
This commit is contained in:
Glenn Carremans 2020-05-14 14:39:21 +02:00 committed by Hans-Christoph Steiner
parent 33683cf870
commit 2021f43761
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA

View File

@ -518,10 +518,6 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
*/
@JsonProperty("localized")
private void setLocalized(Map<String, Map<String, Object>> localized) { // NOPMD
if (localized.size() > 1) {
isLocalized = true;
}
Locale defaultLocale = Locale.getDefault();
String languageTag = defaultLocale.getLanguage();
String countryTag = defaultLocale.getCountry();
@ -575,6 +571,10 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
}
}
if (localesToUse.size() >= 1) {
isLocalized = true;
}
String value = getLocalizedEntry(localized, localesToUse, "whatsNew");
if (!TextUtils.isEmpty(value)) {
whatsNew = value;