mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Add support for animated images to GlideImage.
Our GlideImage implementation doesn't support animated images, because it loads them as bitmaps and therefore only displays the first image frame as a static image. This change works around that issue by having GlideImage wrap an ImageView to handle cases where we need to display animated images.
This commit is contained in:
committed by
Michelle Tang
parent
fb111619d7
commit
288eda5bb1
@@ -27,6 +27,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -42,6 +43,7 @@ import org.thoughtcrime.securesms.components.transfercontrols.TransferProgressSt
|
||||
import org.thoughtcrime.securesms.compose.GlideImage
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri
|
||||
import org.thoughtcrime.securesms.stickers.AvailableStickerPack.DownloadStatus
|
||||
import org.thoughtcrime.securesms.util.DeviceProperties
|
||||
|
||||
@Composable
|
||||
fun StickerPackSectionHeader(
|
||||
@@ -238,6 +240,7 @@ private fun StickerPackInfo(
|
||||
) {
|
||||
GlideImage(
|
||||
model = coverImageUri,
|
||||
enableApngAnimation = DeviceProperties.shouldAllowApngStickerAnimation(LocalContext.current),
|
||||
modifier = Modifier
|
||||
.padding(end = 16.dp)
|
||||
.size(56.dp)
|
||||
|
||||
Reference in New Issue
Block a user