mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +00:00
Removed LanguageBox::createMultiSelect method.
This commit is contained in:
parent
32cebc0d9b
commit
b72fce4894
@ -1095,7 +1095,14 @@ void LanguageBox::prepare() {
|
||||
|
||||
setTitle(tr::lng_languages());
|
||||
|
||||
const auto select = createMultiSelect();
|
||||
const auto topContainer = Ui::CreateChild<Ui::VerticalLayout>(this);
|
||||
|
||||
const auto select = topContainer->add(
|
||||
object_ptr<Ui::MultiSelect>(
|
||||
topContainer,
|
||||
st::defaultMultiSelect,
|
||||
tr::lng_participant_filter()));
|
||||
topContainer->resizeToWidth(st::boxWidth);
|
||||
|
||||
using namespace rpl::mappers;
|
||||
|
||||
@ -1103,13 +1110,13 @@ void LanguageBox::prepare() {
|
||||
const auto inner = setInnerWidget(
|
||||
object_ptr<Content>(this, recent, official),
|
||||
st::boxScroll,
|
||||
select->height());
|
||||
topContainer->height());
|
||||
inner->resizeToWidth(st::boxWidth);
|
||||
|
||||
const auto max = lifetime().make_state<int>(0);
|
||||
rpl::combine(
|
||||
inner->heightValue(),
|
||||
select->heightValue(),
|
||||
topContainer->heightValue(),
|
||||
_1 + _2
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
accumulate_max(*max, height);
|
||||
@ -1180,16 +1187,6 @@ void LanguageBox::setInnerFocus() {
|
||||
_setInnerFocus();
|
||||
}
|
||||
|
||||
not_null<Ui::MultiSelect*> LanguageBox::createMultiSelect() {
|
||||
const auto result = Ui::CreateChild<Ui::MultiSelect>(
|
||||
this,
|
||||
st::defaultMultiSelect,
|
||||
tr::lng_participant_filter());
|
||||
result->resizeToWidth(st::boxWidth);
|
||||
result->moveToLeft(0, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
base::binary_guard LanguageBox::Show() {
|
||||
auto result = base::binary_guard();
|
||||
|
||||
|
@ -33,7 +33,6 @@ protected:
|
||||
private:
|
||||
using Languages = Lang::CloudManager::Languages;
|
||||
|
||||
not_null<Ui::MultiSelect*> createMultiSelect();
|
||||
int rowsInPage() const;
|
||||
|
||||
Fn<void()> _setInnerFocus;
|
||||
|
Loading…
Reference in New Issue
Block a user