mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
fix: sticker confirmation for media editor
This commit is contained in:
parent
3d91d2c80a
commit
2b01b63ee1
3 changed files with 5 additions and 1 deletions
|
@ -192,6 +192,7 @@ StickersListWidget::StickersListWidget(
|
|||
descriptor.show,
|
||||
descriptor.paused)
|
||||
, _mode(descriptor.mode)
|
||||
, _requireConfirmation(descriptor.requireConfirmation)
|
||||
, _show(std::move(descriptor.show))
|
||||
, _features(descriptor.features)
|
||||
, _overBg(st::roundRadiusLarge, st().overBg)
|
||||
|
@ -1917,7 +1918,7 @@ void StickersListWidget::mouseReleaseEvent(QMouseEvent *e) {
|
|||
});
|
||||
});
|
||||
|
||||
if (settings->stickerConfirmation) {
|
||||
if (settings->stickerConfirmation && (_mode == Mode::Full || _mode == Mode::ChatIntro) && _requireConfirmation) {
|
||||
Ui::show(Ui::MakeConfirmBox({
|
||||
.text = tr::ayu_ConfirmationSticker(),
|
||||
.confirmed = sendStickerCallback,
|
||||
|
|
|
@ -77,6 +77,7 @@ struct StickerCustomRecentDescriptor {
|
|||
struct StickersListDescriptor {
|
||||
std::shared_ptr<Show> show;
|
||||
StickersListMode mode = StickersListMode::Full;
|
||||
bool requireConfirmation = true;
|
||||
Fn<bool()> paused;
|
||||
std::vector<StickerCustomRecentDescriptor> customRecentList;
|
||||
const style::EmojiPan *st = nullptr;
|
||||
|
@ -373,6 +374,7 @@ private:
|
|||
not_null<DocumentData*> document);
|
||||
|
||||
const Mode _mode;
|
||||
bool _requireConfirmation;
|
||||
const std::shared_ptr<Show> _show;
|
||||
const ComposeFeatures _features;
|
||||
Ui::RoundRect _overBg;
|
||||
|
|
|
@ -579,6 +579,7 @@ TabbedSelector::Tab TabbedSelector::createTab(SelectorTab type, int index) {
|
|||
.mode = (_mode == Mode::ChatIntro
|
||||
? StickersMode::ChatIntro
|
||||
: StickersMode::Full),
|
||||
.requireConfirmation = _mode != Mode::MediaEditor,
|
||||
.paused = paused,
|
||||
.st = &_st,
|
||||
.features = _features,
|
||||
|
|
Loading…
Add table
Reference in a new issue