Allow copying any type of message. Fixes #276

This commit is contained in:
Tulir Asokan 2022-04-15 20:44:14 +03:00
parent e46694a33f
commit c2a3940e41

View File

@ -212,10 +212,7 @@ func (view *RoomView) OnSelect(message *messages.UIMessage) {
go view.Download(msg.URL, msg.File, path, view.selectReason == SelectOpen)
}
case SelectCopy:
msg, ok := message.Renderer.(*messages.TextMessage)
if ok {
go view.CopyToClipboard(msg.PlainText(), view.selectContent)
}
go view.CopyToClipboard(message.Renderer.PlainText(), view.selectContent)
}
view.selecting = false
view.selectContent = ""