From b3f6fe1c107d9b9354d6834a7d225e2a5b839b1d Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 22 Dec 2020 08:37:36 +0300 Subject: [PATCH] Removed Enter key from box for clearing history. Fixed #9781. --- Telegram/SourceFiles/boxes/confirm_box.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp index 0788195b0..61208028b 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.cpp +++ b/Telegram/SourceFiles/boxes/confirm_box.cpp @@ -801,7 +801,10 @@ void DeleteMessagesBox::resizeEvent(QResizeEvent *e) { void DeleteMessagesBox::keyPressEvent(QKeyEvent *e) { if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) { - deleteAndClear(); + // Don't make the clearing history so easy. + if (!_wipeHistoryPeer) { + deleteAndClear(); + } } else { BoxContent::keyPressEvent(e); }