selection message body now actually working

This commit is contained in:
Blue 2022-05-02 22:25:50 +03:00
parent 0340db7f2f
commit 3c48577eee
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
7 changed files with 138 additions and 40 deletions

View file

@ -499,6 +499,16 @@ void Conversation::onFeedContext(const QPoint& pos)
});
}
QString selected = feed->getSelectedText();
if (selected.size() > 0) {
showMenu = true;
QAction* copy = contextMenu->addAction(Shared::icon("edit-copy"), tr("Copy selected"));
connect(copy, &QAction::triggered, [selected] () {
QClipboard* cb = QApplication::clipboard();
cb->setText(selected);
});
}
QString body = item->getBody();
if (body.size() > 0) {
showMenu = true;