2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Pass Main::Session to click handler creators.

This commit is contained in:
John Preston
2020-06-09 13:36:40 +04:00
parent fc174f742a
commit 03dec15e8e
21 changed files with 117 additions and 93 deletions

View File

@@ -407,7 +407,7 @@ HistoryService::PreparedText HistoryService::prepareGameScoreText() {
auto result = PreparedText {};
auto gamescore = Get<HistoryServiceGameScore>();
auto computeGameTitle = [gamescore, &result]() -> QString {
auto computeGameTitle = [&]() -> QString {
if (gamescore && gamescore->msg) {
if (const auto media = gamescore->msg->media()) {
if (const auto game = media->game()) {
@@ -415,6 +415,7 @@ HistoryService::PreparedText HistoryService::prepareGameScoreText() {
const auto column = 0;
result.links.push_back(
std::make_shared<ReplyMarkupClickHandler>(
&history()->owner(),
row,
column,
gamescore->msg->fullId()));