mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Un-focus chats search on empty history click.
This commit is contained in:
parent
3da51b1bc9
commit
e6d72b4861
2 changed files with 9 additions and 3 deletions
|
@ -6552,6 +6552,14 @@ bool HistoryWidget::cornerButtonsHas(HistoryView::CornerButtonType type) {
|
|||
}
|
||||
|
||||
void HistoryWidget::mousePressEvent(QMouseEvent *e) {
|
||||
if (!_list) {
|
||||
// Remove focus from the chats list search.
|
||||
setFocus();
|
||||
|
||||
// Set it back to the chats list so that typing filter chats.
|
||||
controller()->widget()->setInnerFocus();
|
||||
return;
|
||||
}
|
||||
const auto isReadyToForward = readyToForward();
|
||||
if (_inPhotoEdit && _photoEditMedia) {
|
||||
EditCaptionBox::StartPhotoEdit(
|
||||
|
|
|
@ -1180,10 +1180,8 @@ void MainWidget::setInnerFocus() {
|
|||
}
|
||||
} else if (_mainSection) {
|
||||
_mainSection->setInnerFocus();
|
||||
} else if (_history->peer() || !_thirdSection) {
|
||||
_history->setInnerFocus();
|
||||
} else {
|
||||
_thirdSection->setInnerFocus();
|
||||
_history->setInnerFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue