2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove non-UI calls to App::main.

This commit is contained in:
John Preston
2020-06-12 18:09:04 +04:00
parent 3c4e959468
commit f450f81215
36 changed files with 768 additions and 675 deletions

View File

@@ -400,7 +400,11 @@ void DocumentCancelClickHandler::onClickImpl() const {
return;
} else if (data->uploading()) {
if (const auto item = data->owner().message(context())) {
App::main()->cancelUploadLayer(item);
if (const auto m = App::main()) { // multi good
if (&m->session() == &data->session()) {
m->cancelUploadLayer(item);
}
}
}
} else {
data->cancel();