Merge branch 'charlesmchen/tapToCopySentTimestamp'
This commit is contained in:
commit
ab10bc9bc3
@ -284,9 +284,12 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
||||
}
|
||||
}
|
||||
|
||||
rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_SENT_DATE_TIME",
|
||||
comment: "Label for the 'sent date & time' field of the 'message metadata' view."),
|
||||
value: DateUtil.formatPastTimestampRelativeToNow(message.timestamp)))
|
||||
let sentRow = valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_SENT_DATE_TIME",
|
||||
comment: "Label for the 'sent date & time' field of the 'message metadata' view."),
|
||||
value: DateUtil.formatPastTimestampRelativeToNow(message.timestamp))
|
||||
sentRow.isUserInteractionEnabled = true
|
||||
sentRow.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapSent)))
|
||||
rows.append(sentRow)
|
||||
|
||||
if message as? TSIncomingMessage != nil {
|
||||
rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_RECEIVED_DATE_TIME",
|
||||
@ -703,6 +706,11 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
||||
// no - op
|
||||
}
|
||||
|
||||
@objc func didTapSent(sender: UIGestureRecognizer) {
|
||||
let messageTimestamp = "\(message.timestamp)"
|
||||
UIPasteboard.general.string = messageTimestamp
|
||||
}
|
||||
|
||||
// MediaGalleryDataSourceDelegate
|
||||
|
||||
func mediaGalleryDataSource(_ mediaGalleryDataSource: MediaGalleryDataSource, willDelete items: [MediaGalleryItem], initiatedBy: MediaGalleryDataSourceDelegate) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user