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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user