Fix alt text button

This commit is contained in:
Grishka 2023-03-22 02:46:48 +03:00
parent 0112bfa9c4
commit d6e563486b

View File

@ -6,6 +6,7 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Activity; import android.app.Activity;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewTreeObserver; import android.view.ViewTreeObserver;
@ -230,9 +231,11 @@ public class MediaGridStatusDisplayItem extends StatusDisplayItem{
altTextAnimator.cancel(); altTextAnimator.cancel();
View btn=controllers.get(altTextIndex).altButton; View btn=controllers.get(altTextIndex).altButton;
int i=0;
for(MediaAttachmentViewController c:controllers){ for(MediaAttachmentViewController c:controllers){
if(c.altButton!=null && c.altButton!=btn) if(c.altButton!=null && c.altButton!=btn && !TextUtils.isEmpty(item.attachments.get(i).description))
c.altButton.setVisibility(View.VISIBLE); c.altButton.setVisibility(View.VISIBLE);
i++;
} }
int[] loc={0, 0}; int[] loc={0, 0};