Commit a9dc7758 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Revert "[Imgur Share] Added support to fetch DeleteUrl for Share"

This was done without review and needs more discussion.

This reverts commit c22b558f.
parent c22b558f
...@@ -529,23 +529,13 @@ struct MainWindow::Private { ...@@ -529,23 +529,13 @@ struct MainWindow::Private {
mSharedMessage->setMessageType(KMessageWidget::MessageType::Error); mSharedMessage->setMessageType(KMessageWidget::MessageType::Error);
mSharedMessage->animatedShow(); mSharedMessage->animatedShow();
} else { } else {
const QString imageUrl = output[QStringLiteral("url")].toString(); const QString url = output[QStringLiteral("url")].toString();
const QString deleteUrl = output[QStringLiteral("deleteUrl")].toString();
if (!imageUrl.isEmpty()) { if (!url.isEmpty()) {
if (!deleteUrl.isEmpty()) { mSharedMessage->setText(i18n("The shared image link (<a href=\"%1\">%1</a>) has been copied to the clipboard.", url));
mSharedMessage->setText(
i18n("The shared image link (<a href=\"%1\">%1</a>) has been copied to the clipboard.And Delete Link is (<a href=\"%2\">%2</a>) in "
"case if you want to delete",
imageUrl,
deleteUrl));
} else {
// TODO : This part will be removed Whenever KF min became 5.86
// deleteUrl part support added since 5.86 into purpose
mSharedMessage->setText(i18n("The shared image link (<a href=\"%1\">%1</a>) has been copied to the clipboard", imageUrl));
}
mSharedMessage->setMessageType(KMessageWidget::MessageType::Positive); mSharedMessage->setMessageType(KMessageWidget::MessageType::Positive);
mSharedMessage->animatedShow(); mSharedMessage->animatedShow();
QApplication::clipboard()->setText(imageUrl); QApplication::clipboard()->setText(url);
} else { } else {
mSharedMessage->setVisible(false); mSharedMessage->setVisible(false);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment