From 41a70a353c482dbe0aae466b7255e6dbcdc292a0 Mon Sep 17 00:00:00 2001 From: sk Date: Fri, 7 Apr 2023 18:21:23 +0200 Subject: [PATCH] distinct default languages closes sk22#487 --- .../org/joinmastodon/android/utils/MastodonLanguage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/utils/MastodonLanguage.java b/mastodon/src/main/java/org/joinmastodon/android/utils/MastodonLanguage.java index a184032d9..16db025f4 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/utils/MastodonLanguage.java +++ b/mastodon/src/main/java/org/joinmastodon/android/utils/MastodonLanguage.java @@ -44,7 +44,10 @@ public class MastodonLanguage { 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;