title and content have the same language

This commit is contained in:
Chumva 2018-03-01 17:41:27 +02:00
parent f7f4b65f87
commit c2c853a7a6

View file

@ -167,8 +167,6 @@ public class WikipediaDialogFragment extends DialogFragment {
if (TextUtils.isEmpty(preferredLanguage)) {
preferredLanguage = getMyApplication().getLanguage();
}
final String title = TextUtils.isEmpty(preferredLanguage) ? amenity.getName() : amenity.getName(preferredLanguage);
((TextView) mainView.findViewById(R.id.title_text_view)).setText(title);
String lng = amenity.getContentLanguage("content", preferredLanguage, "en");
if (Algorithms.isEmpty(lng)) {
@ -176,6 +174,8 @@ public class WikipediaDialogFragment extends DialogFragment {
}
final String langSelected = lng;
final String title = TextUtils.isEmpty(preferredLanguage) ? amenity.getName() : amenity.getName(langSelected);
((TextView) mainView.findViewById(R.id.title_text_view)).setText(title);
mainView.findViewById(R.id.read_full_article).setOnClickListener(new View.OnClickListener() {
@Override