mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Don't show placeholder for sent media
This commit is contained in:
parent
cf4fa84043
commit
aa5b0ed6e4
|
@ -382,7 +382,8 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc
|
||||||
case .mediaMessage:
|
case .mediaMessage:
|
||||||
guard let index = viewItems.firstIndex(where: { $0 === viewItem }),
|
guard let index = viewItems.firstIndex(where: { $0 === viewItem }),
|
||||||
let cell = messagesTableView.cellForRow(at: IndexPath(row: index, section: 0)) as? VisibleMessageCell else { return }
|
let cell = messagesTableView.cellForRow(at: IndexPath(row: index, section: 0)) as? VisibleMessageCell else { return }
|
||||||
if let thread = self.thread as? TSContactThread,
|
if viewItem.interaction is TSIncomingMessage,
|
||||||
|
let thread = self.thread as? TSContactThread,
|
||||||
Storage.shared.getContact(with: thread.contactIdentifier())?.isTrusted != true {
|
Storage.shared.getContact(with: thread.contactIdentifier())?.isTrusted != true {
|
||||||
// Ask the user whether they want to download this attachment
|
// Ask the user whether they want to download this attachment
|
||||||
let modal = DownloadAttachmentModal(viewItem: viewItem)
|
let modal = DownloadAttachmentModal(viewItem: viewItem)
|
||||||
|
|
|
@ -337,7 +337,8 @@ final class VisibleMessageCell : MessageCell, LinkPreviewViewDelegate {
|
||||||
stackView.pin(to: snContentView, withInset: inset)
|
stackView.pin(to: snContentView, withInset: inset)
|
||||||
}
|
}
|
||||||
case .mediaMessage:
|
case .mediaMessage:
|
||||||
if let thread = viewItem.interaction.thread as? TSContactThread,
|
if viewItem.interaction is TSIncomingMessage,
|
||||||
|
let thread = viewItem.interaction.thread as? TSContactThread,
|
||||||
Storage.shared.getContact(with: thread.contactIdentifier())?.isTrusted != true {
|
Storage.shared.getContact(with: thread.contactIdentifier())?.isTrusted != true {
|
||||||
let mediaPlaceholderView = MediaPlaceholderView(viewItem: viewItem, textColor: bodyLabelTextColor)
|
let mediaPlaceholderView = MediaPlaceholderView(viewItem: viewItem, textColor: bodyLabelTextColor)
|
||||||
snContentView.addSubview(mediaPlaceholderView)
|
snContentView.addSubview(mediaPlaceholderView)
|
||||||
|
|
Loading…
Reference in a new issue