Fix redundant non-null assertion

Signed-off-by: denis0001-dev <denis0001.dev@ya.ru>
This commit is contained in:
2026-02-15 18:01:04 +03:00
Unverified
parent e94c41e707
commit 67770c0289
@@ -94,7 +94,7 @@ fun AttachmentPreview(
when { when {
isFile -> { isFile -> {
FileIconContent( FileIconContent(
filename = file!!.name, filename = file.name,
sizeBytes = fileSizeBytes, sizeBytes = fileSizeBytes,
onClick = onFileClick, onClick = onFileClick,
isAuthor = isAuthor, isAuthor = isAuthor,
@@ -114,7 +114,7 @@ fun AttachmentPreview(
Box( Box(
modifier = modifier modifier = modifier
.conditional( .conditional(
fileAspectRatio != null && fileAspectRatio!! > 0f, fileAspectRatio != null && fileAspectRatio > 0f,
`if` = { `if` = {
Modifier Modifier
.aspectRatio(fileAspectRatio!!) .aspectRatio(fileAspectRatio!!)
@@ -130,10 +130,10 @@ fun AttachmentPreview(
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
DecryptedImageContent( DecryptedImageContent(
file = file!!, file = file,
envelope = dmEnvelope!!, envelope = dmEnvelope,
currentUserId = currentUserId, currentUserId = currentUserId,
thumbnailBase64 = fileThumbnail!!, thumbnailBase64 = fileThumbnail,
aspectRatio = fileAspectRatio aspectRatio = fileAspectRatio
) )
} }
@@ -142,7 +142,7 @@ fun AttachmentPreview(
Box( Box(
modifier = modifier modifier = modifier
.conditional( .conditional(
fileAspectRatio != null && fileAspectRatio!! > 0f, fileAspectRatio != null && fileAspectRatio > 0f,
`if` = { `if` = {
Modifier Modifier
.aspectRatio(fileAspectRatio!!) .aspectRatio(fileAspectRatio!!)
@@ -158,7 +158,7 @@ fun AttachmentPreview(
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
PendingImageContent( PendingImageContent(
uri = pendingFileUri!!, uri = pendingFileUri,
isUploading = isUploading, isUploading = isUploading,
isImage = true isImage = true
) )