From 67770c0289619aed04b35e20a3b3f4cd011d271f Mon Sep 17 00:00:00 2001 From: denis0001-dev Date: Sun, 15 Feb 2026 18:01:04 +0300 Subject: [PATCH] Fix redundant non-null assertion Signed-off-by: denis0001-dev --- .../ru/fromchat/ui/chat/AttachmentPreview.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/shared/src/commonMain/kotlin/ru/fromchat/ui/chat/AttachmentPreview.kt b/app/shared/src/commonMain/kotlin/ru/fromchat/ui/chat/AttachmentPreview.kt index 0699051..380f241 100644 --- a/app/shared/src/commonMain/kotlin/ru/fromchat/ui/chat/AttachmentPreview.kt +++ b/app/shared/src/commonMain/kotlin/ru/fromchat/ui/chat/AttachmentPreview.kt @@ -94,7 +94,7 @@ fun AttachmentPreview( when { isFile -> { FileIconContent( - filename = file!!.name, + filename = file.name, sizeBytes = fileSizeBytes, onClick = onFileClick, isAuthor = isAuthor, @@ -114,7 +114,7 @@ fun AttachmentPreview( Box( modifier = modifier .conditional( - fileAspectRatio != null && fileAspectRatio!! > 0f, + fileAspectRatio != null && fileAspectRatio > 0f, `if` = { Modifier .aspectRatio(fileAspectRatio!!) @@ -130,10 +130,10 @@ fun AttachmentPreview( contentAlignment = Alignment.Center ) { DecryptedImageContent( - file = file!!, - envelope = dmEnvelope!!, + file = file, + envelope = dmEnvelope, currentUserId = currentUserId, - thumbnailBase64 = fileThumbnail!!, + thumbnailBase64 = fileThumbnail, aspectRatio = fileAspectRatio ) } @@ -142,7 +142,7 @@ fun AttachmentPreview( Box( modifier = modifier .conditional( - fileAspectRatio != null && fileAspectRatio!! > 0f, + fileAspectRatio != null && fileAspectRatio > 0f, `if` = { Modifier .aspectRatio(fileAspectRatio!!) @@ -158,7 +158,7 @@ fun AttachmentPreview( contentAlignment = Alignment.Center ) { PendingImageContent( - uri = pendingFileUri!!, + uri = pendingFileUri, isUploading = isUploading, isImage = true )