Fix build with Xcode.

This commit is contained in:
John Preston 2023-02-27 22:05:10 +04:00
parent ce0e07d332
commit a01f74ecdc
3 changed files with 6 additions and 2 deletions

View File

@ -563,7 +563,10 @@ template <typename Flags>
{ entry.icon });
const auto toggle = Ui::CreateChild<Ui::RpWidget>(
button.get());
auto &lifetime = toggle->lifetime();
// Looks like a bug in Clang, fails to compile with 'auto&' below.
rpl::lifetime &lifetime = toggle->lifetime();
const auto checkView = lifetime.make_state<Ui::ToggleView>(
st.toggle,
toggled,

View File

@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
#include "data/data_chat_participant_status.h"
#include "base/object_ptr.h"
namespace style {
struct SettingsButton;

View File

@ -88,7 +88,7 @@ void PowerSavingBox(not_null<Ui::GenericBox*> box) {
disabler->setClickedCallback([=] {
Ui::ShowMultilineToast({
.parentOverride = container,
.text = tr::lng_settings_power_turn_off(tr::now),
.text = { tr::lng_settings_power_turn_off(tr::now) },
.duration = kForceDisableTooltipDuration,
});
});