distinct default languages

closes sk22#487
This commit is contained in:
sk 2023-04-07 18:21:23 +02:00
parent 8d69bcfd4b
commit 41a70a353c
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,10 @@ public class MastodonLanguage {
for (int i = 0; i < localeList.size(); i++) systemLocales.add(localeList.get(i)); for (int i = 0; i < localeList.size(); i++) systemLocales.add(localeList.get(i));
} }
defaultRecentLanguages = systemLocales.stream().map(Locale::getLanguage).collect(Collectors.toList()); defaultRecentLanguages = systemLocales.stream()
.map(Locale::getLanguage)
.distinct()
.collect(Collectors.toList());
} }
public final String languageTag, name, englishName; public final String languageTag, name, englishName;