mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
parent
3eafd4396e
commit
9e14218bc6
1 changed files with 5 additions and 0 deletions
|
@ -1081,6 +1081,11 @@ InputBar::startUpload(std::unique_ptr<QIODevice> dev, const QString &orgPath, co
|
||||||
auto upload =
|
auto upload =
|
||||||
UploadHandle(new MediaUpload(std::move(dev), format, orgPath, room->isEncrypted(), this));
|
UploadHandle(new MediaUpload(std::move(dev), format, orgPath, room->isEncrypted(), this));
|
||||||
connect(upload.get(), &MediaUpload::uploadComplete, this, &InputBar::finalizeUpload);
|
connect(upload.get(), &MediaUpload::uploadComplete, this, &InputBar::finalizeUpload);
|
||||||
|
// TODO(Nico): Show a retry option
|
||||||
|
connect(upload.get(), &MediaUpload::uploadFailed, this, [this](MediaUpload *up) {
|
||||||
|
ChatPage::instance()->showNotification(tr("Upload of '%1' failed").arg(up->filename()));
|
||||||
|
removeRunUpload(up);
|
||||||
|
});
|
||||||
|
|
||||||
unconfirmedUploads.push_back(std::move(upload));
|
unconfirmedUploads.push_back(std::move(upload));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue