From acce671eb0543f221db8d88bd704e082342a46ee Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 16 Jul 2020 00:58:38 +0300 Subject: [PATCH] Added ability to jump to bottom in HistoryWidget with Ctrl key. Fixed #7868. --- Telegram/SourceFiles/history/history_widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 95d73c6e9..e7304e7d1 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -113,6 +113,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_chat_helpers.h" #include "styles/style_info.h" +#include // keyboardModifiers() #include #include @@ -2932,7 +2933,9 @@ void HistoryWidget::onWindowVisibleChanged() { } void HistoryWidget::historyDownClicked() { - if (_replyReturn && _replyReturn->history() == _history) { + if (QGuiApplication::keyboardModifiers() == Qt::ControlModifier) { + showHistory(_peer->id, ShowAtUnreadMsgId); + } else if (_replyReturn && _replyReturn->history() == _history) { showHistory(_peer->id, _replyReturn->id); } else if (_replyReturn && _replyReturn->history() == _migrated) { showHistory(_peer->id, -_replyReturn->id);