From 83677681e97158d7929abab3d0c9e4cf3f7b9607 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Sun, 6 Nov 2022 10:41:58 +0100 Subject: [PATCH] minor formatting --- .../com/simplemobiletools/smsmessenger/extensions/Context.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index 4de5434b..77b47faf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -334,9 +334,8 @@ fun Context.getMmsAttachment(id: Long, getImageResolutions: Boolean): MessageAtt val attachment = Attachment(partId, id, fileUri.toString(), mimetype, width, height, "") messageAttachment.attachments.add(attachment) } else if (mimetype != "application/smil") { - val attachment = Attachment( - partId, id, Uri.withAppendedPath(uri, partId.toString()).toString(), mimetype, 0, 0, attachmentNames?.getOrNull(attachmentCount) ?: "" - ) + val attachmentName = attachmentNames?.getOrNull(attachmentCount) ?: "" + val attachment = Attachment(partId, id, Uri.withAppendedPath(uri, partId.toString()).toString(), mimetype, 0, 0, attachmentName) messageAttachment.attachments.add(attachment) attachmentCount++ } else {