MastodonLanguage util side done
This commit is contained in:
@@ -7,6 +7,7 @@ import android.content.res.Resources;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.LocaleList;
|
import android.os.LocaleList;
|
||||||
|
|
||||||
|
import org.joinmastodon.android.GlobalUserPreferences;
|
||||||
import org.joinmastodon.android.model.Instance;
|
import org.joinmastodon.android.model.Instance;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -94,9 +95,12 @@ public class MastodonLanguage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MastodonLanguage getDefault(String accountID) {
|
public MastodonLanguage getDefault(String accountID) {
|
||||||
|
if(GlobalUserPreferences.defaultLanguages.get(accountID)==null){
|
||||||
|
GlobalUserPreferences.defaultLanguages.put(accountID, Locale.getDefault().getLanguage());
|
||||||
return from(Locale.getDefault().getLanguage());
|
return from(Locale.getDefault().getLanguage());
|
||||||
}
|
}
|
||||||
|
return from(GlobalUserPreferences.defaultLanguages.get(accountID));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user