2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Added initial implementation of cancel of media uploading for editing.

This commit is contained in:
23rd
2019-03-29 17:17:46 +03:00
committed by John Preston
parent 741501d1d9
commit 653fd1bb63
4 changed files with 35 additions and 4 deletions

View File

@@ -842,11 +842,16 @@ void MainWidget::cancelUploadLayer(not_null<HistoryItem*> item) {
Ui::hideLayer();
if (const auto item = App::histItemById(itemId)) {
const auto history = item->history();
//item->destroy();
history->requestChatListMessage();
if (!item->isEditingMedia()) {
item->destroy();
history->requestChatListMessage();
} else {
item->returnSavedMedia();
session().uploader().cancel(item->fullId());
}
session().data().sendHistoryChangeNotifications();
}
//session().uploader().unpause();
session().uploader().unpause();
};
const auto continueUpload = [=] {
session().uploader().unpause();