2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Select/forward/delete group of messages.

This commit is contained in:
John Preston
2017-12-15 21:36:28 +03:00
parent 537400d8b2
commit b6087ce7ce
5 changed files with 228 additions and 156 deletions

View File

@@ -965,9 +965,18 @@ void MainWidget::cancelUploadLayer() {
return;
}
Auth().uploader().pause(item->fullId());
Ui::show(Box<ConfirmBox>(lang(lng_selected_cancel_sure_this), lang(lng_selected_upload_stop), lang(lng_continue), base::lambda_guarded(this, [this] {
_history->deleteContextItem(false);
const auto itemId = item->fullId();
Auth().uploader().pause(itemId);
Ui::show(Box<ConfirmBox>(lang(lng_selected_cancel_sure_this), lang(lng_selected_upload_stop), lang(lng_continue), base::lambda_guarded(this, [=] {
Ui::hideLayer();
if (const auto item = App::histItemById(itemId)) {
const auto history = item->history();
const auto wasLast = (history->lastMsg == item);
item->destroy();
if (wasLast && !history->lastMsg) {
checkPeerHistory(history->peer);
}
}
Auth().uploader().unpause();
}), base::lambda_guarded(this, [] {
Auth().uploader().unpause();