mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
remove redundant "failed to download" method
This commit is contained in:
parent
efe07e1ddb
commit
43884af191
1 changed files with 1 additions and 27 deletions
|
@ -359,14 +359,6 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
|||
private func contentRows() -> [UIView] {
|
||||
var rows = [UIView]()
|
||||
|
||||
if hasMediaAttachment {
|
||||
// TODO this is only used for adding a not-yet-downloaded-attachment. Name more clearly? Or inline?
|
||||
// if let undownloadedAttachmentRow = getUndownloadedAttachmentRow() {
|
||||
// rows.append(undownloadedAttachmentRow)
|
||||
// }
|
||||
rows += addAttachmentRows()
|
||||
}
|
||||
|
||||
let messageBubbleView = OWSMessageBubbleView(frame: CGRect.zero)
|
||||
messageBubbleView.delegate = self
|
||||
messageBubbleView.addTapGestureHandler()
|
||||
|
@ -418,25 +410,6 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
|||
return attachment
|
||||
}
|
||||
|
||||
private func addAttachmentRows() -> [UIView] {
|
||||
var rows = [UIView]()
|
||||
|
||||
guard let attachment = self.attachment else {
|
||||
Logger.warn("Missing attachment. Was it deleted?")
|
||||
return rows
|
||||
}
|
||||
|
||||
guard let attachmentStream = attachment as? TSAttachmentStream else {
|
||||
rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_ATTACHMENT_NOT_YET_DOWNLOADED",
|
||||
comment: "Label for 'not yet downloaded' attachments in the 'message metadata' view."),
|
||||
value: ""))
|
||||
return rows
|
||||
}
|
||||
self.attachmentStream = attachmentStream
|
||||
|
||||
return rows
|
||||
}
|
||||
|
||||
var hasMediaAttachment: Bool {
|
||||
guard let attachment = self.attachment else {
|
||||
return false
|
||||
|
@ -566,6 +539,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
|||
}
|
||||
self.message = newMessage
|
||||
self.attachment = self.fetchAttachment(transaction: transaction)
|
||||
self.attachmentStream = self.attachment as? TSAttachmentStream
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue