diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-15 15:55:03 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-15 15:55:03 +0200 |
commit | 9e14218bc6d56decfc451000e31eb6849bb16592 (patch) | |
tree | 8998721ceee4512734489d50b76563b0100d4540 | |
parent | Fix pins not refreshing after being loaded (diff) | |
download | nheko-9e14218bc6d56decfc451000e31eb6849bb16592.tar.xz |
Fix failed uploads not removing uploads
fixes #1098
-rw-r--r-- | src/timeline/InputBar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 4a3605bb..97fe5cf4 100644 --- a/src/timeline/InputBar.cpp +++ b/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)); |