diff --git a/ShareExtension/Attachments.swift b/ShareExtension/Attachments.swift index bb63eb0..d6a3258 100644 --- a/ShareExtension/Attachments.swift +++ b/ShareExtension/Attachments.swift @@ -24,31 +24,8 @@ func loadAttachments(with extensionContext: NSExtensionContext?, loadedItems: @e let item = extensionContext.inputItems[0] as! NSExtensionItem if let attachments = item.attachments { - if let text = item.attributedContentText?.string { - - log("Found text content: \(text)") - - result.textToSend = text - - #if os(macOS) - result.previewImage = NSImage(named: NSImage.multipleDocumentsName) - #else - result.previewImage = Image(systemName: "text.document") - #endif - - let maxLength = 50 - let cleanedText = text.replacingOccurrences(of: "\n", with: " ").replacingOccurrences(of: "\r", with: "") - - if cleanedText.count > maxLength { - let index = cleanedText.index(cleanedText.startIndex, offsetBy: maxLength) - result.shortDescription = String(cleanedText[.. maxLength { + let index = cleanedText.index(cleanedText.startIndex, offsetBy: maxLength) + result.shortDescription = String(cleanedText[..