Quick Fix

This commit is contained in:
Adith 2024-10-24 23:49:36 +11:00
parent ea94ea782b
commit 294f086d07

View file

@ -707,11 +707,9 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
*/ */
private void buildDepictionList(List<IdAndCaptions> idAndCaptions) { private void buildDepictionList(List<IdAndCaptions> idAndCaptions) {
binding.mediaDetailDepictionContainer.removeAllViews(); binding.mediaDetailDepictionContainer.removeAllViews();
String fullCode = Locale.getDefault().getLanguage();
String locale = fullCode.contains(",") ? fullCode.substring(0, fullCode.indexOf(',')).trim() : fullCode;
for (IdAndCaptions idAndCaption : idAndCaptions) { for (IdAndCaptions idAndCaption : idAndCaptions) {
binding.mediaDetailDepictionContainer.addView(buildDepictLabel( binding.mediaDetailDepictionContainer.addView(buildDepictLabel(
getDepictionCaption(idAndCaption, locale), getDepictionCaption(idAndCaption, Locale.getDefault().getLanguage()),
idAndCaption.getId(), idAndCaption.getId(),
binding.mediaDetailDepictionContainer binding.mediaDetailDepictionContainer
)); ));