fix disappearing no-alt indicator

closes sk22#484
This commit is contained in:
sk 2023-04-07 17:16:45 +02:00
parent be60e78ea6
commit 0ef30f82a7
1 changed files with 6 additions and 2 deletions

View File

@ -249,8 +249,12 @@ public class MediaGridStatusDisplayItem extends StatusDisplayItem{
View btn=controllers.get(altTextIndex).btnsWrap;
int i=0;
for(MediaAttachmentViewController c:controllers){
if(c.btnsWrap!=null && c.btnsWrap!=btn && !TextUtils.isEmpty(item.attachments.get(i).description))
c.btnsWrap.setVisibility(View.VISIBLE);
boolean hasAltText = !TextUtils.isEmpty(item.attachments.get(i).description);
if(c.btnsWrap!=null
&& c.btnsWrap!=btn
&& ((hasAltText && GlobalUserPreferences.showAltIndicator)
|| (!hasAltText && GlobalUserPreferences.showNoAltIndicator))
) c.btnsWrap.setVisibility(View.VISIBLE);
i++;
}