mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed display of chats filters strip from dialogs widget in search mode.
This commit is contained in:
parent
a77777f509
commit
f89167ef94
1 changed files with 8 additions and 1 deletions
|
@ -3139,6 +3139,9 @@ bool Widget::applySearchState(SearchState state) {
|
||||||
const auto tagsChanged = (_searchState.tags != state.tags);
|
const auto tagsChanged = (_searchState.tags != state.tags);
|
||||||
const auto queryChanged = (_searchState.query != state.query);
|
const auto queryChanged = (_searchState.query != state.query);
|
||||||
const auto tabChanged = (_searchState.tab != state.tab);
|
const auto tabChanged = (_searchState.tab != state.tab);
|
||||||
|
const auto queryEmptyChanged = queryChanged
|
||||||
|
? (_searchState.query.isEmpty() != state.query.isEmpty())
|
||||||
|
: false;
|
||||||
|
|
||||||
if (forum) {
|
if (forum) {
|
||||||
if (_openedForum == forum) {
|
if (_openedForum == forum) {
|
||||||
|
@ -3174,6 +3177,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) {
|
||||||
|
_chatFilters->setVisible(_searchState.query.isEmpty());
|
||||||
|
updateControlsGeometry();
|
||||||
|
}
|
||||||
_searchWithPostsPreview = computeSearchWithPostsPreview();
|
_searchWithPostsPreview = computeSearchWithPostsPreview();
|
||||||
if (queryChanged) {
|
if (queryChanged) {
|
||||||
updateLockUnlockVisibility(anim::type::normal);
|
updateLockUnlockVisibility(anim::type::normal);
|
||||||
|
@ -3591,7 +3598,7 @@ void Widget::updateControlsGeometry() {
|
||||||
_chatFilters->move(0, chatFiltersTop);
|
_chatFilters->move(0, chatFiltersTop);
|
||||||
}
|
}
|
||||||
const auto scrollTop = chatFiltersTop
|
const auto scrollTop = chatFiltersTop
|
||||||
+ (_chatFilters
|
+ ((_chatFilters && _searchState.query.isEmpty())
|
||||||
? (_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