diff --git a/Telegram/SourceFiles/boxes/auto_download_box.cpp b/Telegram/SourceFiles/boxes/auto_download_box.cpp index ed6ae59a3..ae42f3cc8 100644 --- a/Telegram/SourceFiles/boxes/auto_download_box.cpp +++ b/Telegram/SourceFiles/boxes/auto_download_box.cpp @@ -109,11 +109,11 @@ void AutoDownloadBox::setupContent() { Type type, rpl::producer label) { const auto value = settings->bytesLimit(_source, type); - AddButton( + content->add(object_ptr( content, std::move(label), st::settingsButtonNoIcon - )->toggleOn( + ))->toggleOn( rpl::single(value > 0) )->toggledChanges( ) | rpl::start_with_next([=](bool enabled) { diff --git a/Telegram/SourceFiles/boxes/background_box.cpp b/Telegram/SourceFiles/boxes/background_box.cpp index a18df1bfe..4369863c9 100644 --- a/Telegram/SourceFiles/boxes/background_box.cpp +++ b/Telegram/SourceFiles/boxes/background_box.cpp @@ -168,7 +168,7 @@ void BackgroundBox::prepare() { Ui::AddSkip(container); - const auto button = container->add(Settings::CreateButton( + const auto button = container->add(object_ptr( container, tr::lng_settings_bg_from_file(), st::infoProfileButton)); diff --git a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp index 198ec9e93..d0591a1b5 100644 --- a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp @@ -295,7 +295,7 @@ void EditPrivacyBox::setupContent() { const auto button = content->add( object_ptr>( content, - CreateButton( + object_ptr