Fixed mouse track on right button for bots when there is unread badge.

This commit is contained in:
23rd 2024-12-11 12:41:56 +03:00
parent a6030d708d
commit 56d6c4eb30

View file

@ -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<Key> &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)) {