Fix media preview sometimes not showing (#3023)

This commit is contained in:
Eva Tatarka 2022-12-08 12:25:59 -08:00 committed by GitHub
parent a6b6a40ba6
commit 2de2af0a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -457,6 +457,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
final StatusActionListener listener, boolean showingContent,
boolean useBlurhash) {
mediaPreview.setVisibility(View.VISIBLE);
mediaPreview.setAspectRatios(AttachmentHelper.aspectRatios(attachments));
mediaPreview.forEachIndexed((i, imageView) -> {

View File

@ -1,7 +1,6 @@
package com.keylesspalace.tusky.view
import android.content.Context
import android.graphics.Canvas
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
@ -186,10 +185,6 @@ class MediaPreviewLayout(context: Context, attrs: AttributeSet? = null) :
action(index, getChildAt(index) as MediaPreviewImageView)
}
}
override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas)
}
}
private fun rowHeight(halfWidth: Int, aspect1: Double, aspect2: Double): Int {