mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2966 Chats | Fix | Scaling crash (#2416)
This commit is contained in:
parent
d80bf53104
commit
110d24fa72
3 changed files with 19 additions and 3 deletions
|
@ -42,6 +42,8 @@ import com.anytypeio.anytype.feature_chats.presentation.ChatView
|
|||
import com.anytypeio.anytype.presentation.objects.ObjectIcon
|
||||
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
|
||||
import com.bumptech.glide.integration.compose.GlideImage
|
||||
import com.bumptech.glide.load.DecodeFormat
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
|
||||
@Composable
|
||||
@OptIn(ExperimentalGlideComposeApi::class)
|
||||
|
@ -94,7 +96,13 @@ fun BubbleAttachments(
|
|||
.clickable {
|
||||
onAttachmentClicked(attachment)
|
||||
}
|
||||
)
|
||||
) {
|
||||
it
|
||||
.override(1024, 1024)
|
||||
.centerCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.format(DecodeFormat.PREFER_RGB_565)
|
||||
}
|
||||
}
|
||||
}
|
||||
is ChatView.Message.Attachment.Link -> {
|
||||
|
|
|
@ -23,6 +23,8 @@ import com.anytypeio.anytype.feature_chats.R
|
|||
import com.anytypeio.anytype.feature_chats.presentation.ChatView
|
||||
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
|
||||
import com.bumptech.glide.integration.compose.GlideImage
|
||||
import com.bumptech.glide.load.DecodeFormat
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
|
||||
@OptIn(ExperimentalGlideComposeApi::class)
|
||||
@Composable
|
||||
|
@ -65,7 +67,13 @@ fun BubbleGalleryRowLayout(
|
|||
.clickable {
|
||||
onAttachmentClicked(image)
|
||||
}
|
||||
)
|
||||
) {
|
||||
it
|
||||
.override(512, 512)
|
||||
.centerCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.format(DecodeFormat.PREFER_RGB_565)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue