mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix message field focus loss in Saved Messages.
This commit is contained in:
parent
7f66e0fdfe
commit
01821c30e5
1 changed files with 4 additions and 1 deletions
|
@ -66,6 +66,7 @@ ContentWidget::ContentWidget(
|
||||||
_controller->wrapValue(),
|
_controller->wrapValue(),
|
||||||
_controller->searchEnabledByContent(),
|
_controller->searchEnabledByContent(),
|
||||||
(_1 == Wrap::Layer) && _2
|
(_1 == Wrap::Layer) && _2
|
||||||
|
) | rpl::distinct_until_changed(
|
||||||
) | rpl::start_with_next([this](bool shown) {
|
) | rpl::start_with_next([this](bool shown) {
|
||||||
refreshSearchField(shown);
|
refreshSearchField(shown);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
@ -257,7 +258,9 @@ void ContentWidget::refreshSearchField(bool shown) {
|
||||||
_searchField->setFocus();
|
_searchField->setFocus();
|
||||||
setScrollTopSkip(view->heightNoMargins() - st::lineWidth);
|
setScrollTopSkip(view->heightNoMargins() - st::lineWidth);
|
||||||
} else {
|
} else {
|
||||||
setFocus();
|
if (Ui::InFocusChain(this)) {
|
||||||
|
setFocus();
|
||||||
|
}
|
||||||
_searchWrap = nullptr;
|
_searchWrap = nullptr;
|
||||||
setScrollTopSkip(0);
|
setScrollTopSkip(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue