Fix GalleryDetailHeaderCard thumb flicker

This commit is contained in:
tarsin committed 2023-05-15 12:58:53 +08:00
1 parent c4ff48f60f
commit 1d14e3ceb4
1 file changed
+2 -1
@@ -18,6 +18,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
@@ -102,7 +103,7 @@ fun GalleryDetailHeaderCard(
Row {
Card {
EhAsyncCropThumb(
model = info.thumb,
model = remember(info.thumb) { info.thumb },
modifier = Modifier.height(dimensionResource(id = R.dimen.gallery_detail_thumb_height)).width(dimensionResource(id = R.dimen.gallery_detail_thumb_width)),
)
}