mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Removed forwarding options for dices.
This commit is contained in:
parent
58da62b413
commit
d4c0ac5e4a
1 changed files with 18 additions and 2 deletions
|
@ -5367,14 +5367,26 @@ void HistoryWidget::mousePressEvent(QMouseEvent *e) {
|
||||||
for (const auto item : _toForward.items) {
|
for (const auto item : _toForward.items) {
|
||||||
if (const auto media = item->media()) {
|
if (const auto media = item->media()) {
|
||||||
if (!item->originalText().text.isEmpty()
|
if (!item->originalText().text.isEmpty()
|
||||||
&& (media->photo() || media->document())
|
&& media->allowsEditCaption()) {
|
||||||
&& !media->webpage()) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}();
|
}();
|
||||||
|
const auto hasOnlyForcedForwardedInfo = [&] {
|
||||||
|
if (hasCaptions) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (const auto item : _toForward.items) {
|
||||||
|
if (const auto media = item->media()) {
|
||||||
|
if (!media->forceForwardedInfo()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}();
|
||||||
const auto dropCaptions = (now == Options::NoNamesAndCaptions);
|
const auto dropCaptions = (now == Options::NoNamesAndCaptions);
|
||||||
const auto weak = Ui::MakeWeak(this);
|
const auto weak = Ui::MakeWeak(this);
|
||||||
const auto changeRecipient = crl::guard(weak, [=] {
|
const auto changeRecipient = crl::guard(weak, [=] {
|
||||||
|
@ -5389,6 +5401,10 @@ void HistoryWidget::mousePressEvent(QMouseEvent *e) {
|
||||||
.options = draft.options,
|
.options = draft.options,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (hasOnlyForcedForwardedInfo) {
|
||||||
|
changeRecipient();
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto optionsChanged = crl::guard(weak, [=](
|
const auto optionsChanged = crl::guard(weak, [=](
|
||||||
Ui::ForwardOptions options) {
|
Ui::ForwardOptions options) {
|
||||||
const auto newOptions = (options.hasCaptions
|
const auto newOptions = (options.hasCaptions
|
||||||
|
|
Loading…
Add table
Reference in a new issue