Fix build for Xcode.

This commit is contained in:
John Preston 2024-04-20 00:07:38 +04:00
parent e6ba85e112
commit 9caff93c35
3 changed files with 5 additions and 2 deletions

View File

@ -1831,7 +1831,7 @@ Ui::Toast::Config PrepareTogglePinToast(
lt_count,
count))
: QString()),
.text = (pin
.text = { (pin
? (count == 1
? tr::lng_mediaview_pin_story_about(tr::now)
: tr::lng_mediaview_pin_stories_about(
@ -1843,7 +1843,7 @@ Ui::Toast::Config PrepareTogglePinToast(
: tr::lng_mediaview_unpin_stories_done(
tr::now,
lt_count,
count))),
count))) },
.st = &st::storiesActionToast,
.duration = (pin
? Data::Stories::kInProfileToastDuration

View File

@ -18,6 +18,8 @@ DiscreteSlider::DiscreteSlider(QWidget *parent, bool snapToLabel)
setCursor(style::cur_pointer);
}
DiscreteSlider::~DiscreteSlider() = default;
void DiscreteSlider::setActiveSection(int index) {
_activeIndex = index;
activateCallback();

View File

@ -19,6 +19,7 @@ class RippleAnimation;
class DiscreteSlider : public RpWidget {
public:
DiscreteSlider(QWidget *parent, bool snapToLabel);
~DiscreteSlider();
void addSection(const QString &label);
void setSections(const std::vector<QString> &labels);