2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Add some checks for actions in a locked state.

This commit is contained in:
John Preston
2021-12-06 12:31:08 +04:00
parent 6db537d1ec
commit 01c2be3f01
3 changed files with 19 additions and 12 deletions

View File

@@ -1257,8 +1257,9 @@ void MainWidget::ui_showPeerHistory(
PeerId peerId,
const SectionShow &params,
MsgId showAtMsgId) {
if (auto peer = session().data().peerLoaded(peerId)) {
if (peerId && _controller->window().locked()) {
return;
} else if (auto peer = session().data().peerLoaded(peerId)) {
if (peer->migrateTo()) {
peer = peer->migrateTo();
peerId = peer->id;
@@ -1579,6 +1580,9 @@ void MainWidget::showNewSection(
const SectionShow &params) {
using Column = Window::Column;
if (_controller->window().locked()) {
return;
}
auto saveInStack = (params.way == SectionShow::Way::Forward);
const auto thirdSectionTop = getThirdSectionTop();
const auto newThirdGeometry = QRect(