From 56d6c4eb307ee539ebc72338847c2e82f32c74b5 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Dec 2024 12:41:56 +0300 Subject: [PATCH] Fixed mouse track on right button for bots when there is unread badge. --- Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 5d476d854..a668fdd26 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -130,7 +130,9 @@ constexpr auto kPreviewPostsLimit = 3; if (const auto history = row->key().history()) { if (const auto user = history->peer->asUser()) { if (user->botInfo && user->botInfo->hasMainApp) { - return user; + if (!history->unreadCount() && !history->unreadMark()) { + return user; + } } } } @@ -1947,7 +1949,10 @@ const std::vector &InnerWidget::pinnedChatsOrder() const { } void InnerWidget::checkReorderPinnedStart(QPoint localPosition) { - if (!_pressed || _dragging || _state != WidgetState::Default) { + if (!_pressed + || _dragging + || (_state != WidgetState::Default) + || _pressedBotApp) { return; } else if (qAbs(localPosition.y() - _dragStart.y()) < style::ConvertScale(kStartReorderThreshold)) {