mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Fixed display of chat filters strip while search in peer.
This commit is contained in:
parent
6704886c6e
commit
b1c5c53687
1 changed files with 6 additions and 3 deletions
|
@ -3487,9 +3487,10 @@ bool Widget::applySearchState(SearchState state) {
|
||||||
? peer->owner().history(migrateFrom).get()
|
? peer->owner().history(migrateFrom).get()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
_searchState = state;
|
_searchState = state;
|
||||||
if (_chatFilters && queryEmptyChanged) {
|
if (_chatFilters && (queryEmptyChanged || inChatChanged)) {
|
||||||
_chatFilters->setVisible(_searchState.query.isEmpty()
|
_chatFilters->setVisible(_searchState.query.isEmpty()
|
||||||
&& !_openedForum);
|
&& !_openedForum
|
||||||
|
&& !searchInPeer());
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
}
|
}
|
||||||
if (_topBarSuggestion && queryEmptyChanged) {
|
if (_topBarSuggestion && queryEmptyChanged) {
|
||||||
|
@ -3919,7 +3920,9 @@ void Widget::updateControlsGeometry() {
|
||||||
_chatFilters->move(0, chatFiltersTop);
|
_chatFilters->move(0, chatFiltersTop);
|
||||||
}
|
}
|
||||||
const auto scrollTop = chatFiltersTop
|
const auto scrollTop = chatFiltersTop
|
||||||
+ ((_chatFilters && _searchState.query.isEmpty() && !_openedForum)
|
+ ((_chatFilters
|
||||||
|
&& _searchState.query.isEmpty()
|
||||||
|
&& !_openedForum && !searchInPeer())
|
||||||
? (_chatFilters->height() * (1. - narrowRatio))
|
? (_chatFilters->height() * (1. - narrowRatio))
|
||||||
: 0);
|
: 0);
|
||||||
const auto scrollHeight = height() - scrollTop - bottomSkip;
|
const auto scrollHeight = height() - scrollTop - bottomSkip;
|
||||||
|
|
Loading…
Add table
Reference in a new issue