Fix wrong thumb crop behaviour

This commit is contained in:
tarsin committed 2023-05-26 14:59:03 +08:00
1 parent 4a7d4dedd0
commit a8e3f67371
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) {