mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-01-07 09:54:30 +00:00
Merge pull request #4928 from ryanbrown535/develop
GH-4901 Confirm screenshot upload
This commit is contained in:
commit
90b16fb903
@ -314,6 +314,20 @@ void ScreenshotsPage::on_actionUpload_triggered()
|
||||
if (selection.isEmpty())
|
||||
return;
|
||||
|
||||
auto uploadText = tr("Upload screenshot to imgur.com?");
|
||||
if (selection.size() > 1)
|
||||
uploadText = tr("Upload %1 screenshots to imgur.com?").arg(selection.size());
|
||||
|
||||
auto response = CustomMessageBox::selectable(
|
||||
this,
|
||||
tr("Upload?"),
|
||||
uploadText,
|
||||
QMessageBox::Question,
|
||||
QMessageBox::Yes | QMessageBox::No
|
||||
)->exec();
|
||||
if (response == QMessageBox::No)
|
||||
return;
|
||||
|
||||
QList<ScreenShot::Ptr> uploaded;
|
||||
auto job = NetJob::Ptr(new NetJob("Screenshot Upload", APPLICATION->network()));
|
||||
if(selection.size() < 2)
|
||||
|
Loading…
Reference in New Issue
Block a user