Fix wrong thumb crop behaviour

This commit is contained in:
tarsin committed 2023-05-26 15:45:38 +08:00
1 parent 636ac64692
commit 868ac22c69
3 files changed
+3 -3

No files matched your search

@@ -39,7 +39,7 @@ fun EhAsyncCropThumb(
key: GalleryInfo,
modifier: Modifier = Modifier,
) {
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
var contentScale by remember(key.gid) { mutableStateOf(ContentScale.Fit) }
AsyncImage(
model = requestOf(key),
contentDescription = null,
@@ -44,7 +44,7 @@ fun EhAsyncPreview(
model: GalleryPreview,
modifier: Modifier = Modifier,
) {
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
var contentScale by remember(model.imageKey) { mutableStateOf(ContentScale.Fit) }
AsyncImage(
model = requestOf(model),
contentDescription = null,
@@ -1253,7 +1253,7 @@ private fun CompanionAsyncThumb(
path: UniFile,
modifier: Modifier = Modifier,
) {
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
var contentScale by remember(info.gid) { mutableStateOf(ContentScale.Fit) }
val coroutineScope = rememberCoroutineScope { Dispatchers.IO }
val context = LocalContext.current
var localReq by remember(info.gid) {