mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix build with MSVC.
This commit is contained in:
parent
2d786aa02c
commit
4a5d8aa217
2 changed files with 4 additions and 4 deletions
|
@ -2696,7 +2696,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
const auto sponsored = (item && item->isSponsored())
|
const auto sponsored = (item && item->isSponsored())
|
||||||
? item
|
? item
|
||||||
: (Element::Moused() && Element::Moused()->data()->isSponsored())
|
: (Element::Moused() && Element::Moused()->data()->isSponsored())
|
||||||
? Element::Moused()->data()
|
? Element::Moused()->data().get()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
if (sponsored) {
|
if (sponsored) {
|
||||||
Menu::FillSponsored(
|
Menu::FillSponsored(
|
||||||
|
|
|
@ -368,10 +368,10 @@ void FillSponsored(
|
||||||
const auto details = session->sponsoredMessages().lookupDetails(fullId);
|
const auto details = session->sponsoredMessages().lookupDetails(fullId);
|
||||||
const auto &info = details.info;
|
const auto &info = details.info;
|
||||||
|
|
||||||
if (!mediaViewer && !details.info.empty()) {
|
if (!mediaViewer && !info.empty()) {
|
||||||
auto fillSubmenu = [&](not_null<Ui::PopupMenu*> menu) {
|
auto fillSubmenu = [&](not_null<Ui::PopupMenu*> menu) {
|
||||||
const auto allText = ranges::accumulate(
|
const auto allText = ranges::accumulate(
|
||||||
details.info,
|
info,
|
||||||
TextWithEntities(),
|
TextWithEntities(),
|
||||||
[](TextWithEntities a, TextWithEntities b) {
|
[](TextWithEntities a, TextWithEntities b) {
|
||||||
return a.text.isEmpty() ? b : a.append('\n').append(b);
|
return a.text.isEmpty() ? b : a.append('\n').append(b);
|
||||||
|
@ -380,7 +380,7 @@ void FillSponsored(
|
||||||
TextUtilities::SetClipboardText({ allText });
|
TextUtilities::SetClipboardText({ allText });
|
||||||
show->showToast(tr::lng_text_copied(tr::now));
|
show->showToast(tr::lng_text_copied(tr::now));
|
||||||
};
|
};
|
||||||
for (const auto &i : details.info) {
|
for (const auto &i : info) {
|
||||||
auto item = base::make_unique_q<Ui::Menu::MultilineAction>(
|
auto item = base::make_unique_q<Ui::Menu::MultilineAction>(
|
||||||
menu,
|
menu,
|
||||||
st::defaultMenu,
|
st::defaultMenu,
|
||||||
|
|
Loading…
Add table
Reference in a new issue