mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-26 23:43:06 +02:00
Version 5.16: Fix build with GCC.
This commit is contained in:
parent
4584d912cc
commit
869854fbc2
3 changed files with 7 additions and 3 deletions
|
@ -534,11 +534,16 @@ std::shared_ptr<ClickHandler> AcceptClickHandler(
|
||||||
|
|
||||||
std::shared_ptr<ClickHandler> DeclineClickHandler(
|
std::shared_ptr<ClickHandler> DeclineClickHandler(
|
||||||
not_null<HistoryItem*> item) {
|
not_null<HistoryItem*> item) {
|
||||||
|
const auto session = &item->history()->session();
|
||||||
const auto id = item->fullId();
|
const auto id = item->fullId();
|
||||||
return std::make_shared<LambdaClickHandler>([=](ClickContext context) {
|
return std::make_shared<LambdaClickHandler>([=](ClickContext context) {
|
||||||
const auto my = context.other.value<ClickHandlerContext>();
|
const auto my = context.other.value<ClickHandlerContext>();
|
||||||
const auto controller = my.sessionWindow.get();
|
const auto controller = my.sessionWindow.get();
|
||||||
if (!controller) {
|
if (!controller || &controller->session() != session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const auto item = session->data().message(id);
|
||||||
|
if (!item) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RequestDeclineComment(controller->uiShow(), item);
|
RequestDeclineComment(controller->uiShow(), item);
|
||||||
|
|
|
@ -288,7 +288,6 @@ auto GenerateSuggestRequestMedia(
|
||||||
: nullptr;
|
: nullptr;
|
||||||
const auto changes = ResolveChanges(item, original);
|
const auto changes = ResolveChanges(item, original);
|
||||||
const auto from = item->from();
|
const auto from = item->from();
|
||||||
const auto peer = item->history()->peer;
|
|
||||||
|
|
||||||
auto pushText = [&](
|
auto pushText = [&](
|
||||||
TextWithEntities text,
|
TextWithEntities text,
|
||||||
|
|
|
@ -431,7 +431,7 @@ void MainWindow::createGlobalMenu() {
|
||||||
u"Telegram"_q),
|
u"Telegram"_q),
|
||||||
[=] {
|
[=] {
|
||||||
ensureWindowShown();
|
ensureWindowShown();
|
||||||
controller().show(Box<AboutBox>());
|
controller().show(Box(AboutBox));
|
||||||
});
|
});
|
||||||
|
|
||||||
about->setMenuRole(QAction::AboutQtRole);
|
about->setMenuRole(QAction::AboutQtRole);
|
||||||
|
|
Loading…
Add table
Reference in a new issue