Fixed a bug where sharing a url with LinkPreviews disabled could result in it being duplicated in the message

This commit is contained in:
Morgan Pretty 2022-03-23 10:00:49 +11:00
parent 88f63c1434
commit e7e8aba69a
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ final class ThreadPickerVC: UIViewController, UITableViewDataSource, UITableView
message.sentTimestamp = NSDate.millisecondTimestamp()
message.text = (isSharingUrl && (messageText?.isEmpty == true || attachments[0].linkPreviewDraft == nil) ?
(
(messageText?.isEmpty == true ?
(messageText?.isEmpty == true || (attachments[0].text() == messageText) ?
attachments[0].text() :
"\(attachments[0].text() ?? "")\n\n\(messageText ?? "")"
)