Fix failed uploads not removing uploads

fixes #1098
pull/1100/head
Nicolas Werner 2 years ago
parent 3eafd4396e
commit 9e14218bc6
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 5
      src/timeline/InputBar.cpp

@ -1081,6 +1081,11 @@ InputBar::startUpload(std::unique_ptr<QIODevice> dev, const QString &orgPath, co
auto upload =
UploadHandle(new MediaUpload(std::move(dev), format, orgPath, room->isEncrypted(), this));
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));

Loading…
Cancel
Save