2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Track factcheck text and create media.

This commit is contained in:
John Preston
2024-05-21 18:15:56 +04:00
parent 5ee2bca616
commit b299881bf8
13 changed files with 332 additions and 11 deletions

View File

@@ -4250,29 +4250,27 @@ void Session::notifyPollUpdateDelayed(not_null<PollData*> poll) {
}
void Session::sendWebPageGamePollNotifications() {
auto resize = std::vector<not_null<ViewElement*>>();
for (const auto &page : base::take(_webpagesUpdated)) {
_webpageUpdates.fire_copy(page);
const auto i = _webpageViews.find(page);
if (i != _webpageViews.end()) {
for (const auto &view : i->second) {
requestViewResize(view);
}
if (const auto i = _webpageViews.find(page)
; i != _webpageViews.end()) {
resize.insert(end(resize), begin(i->second), end(i->second));
}
}
for (const auto &game : base::take(_gamesUpdated)) {
if (const auto i = _gameViews.find(game); i != _gameViews.end()) {
for (const auto &view : i->second) {
requestViewResize(view);
}
resize.insert(end(resize), begin(i->second), end(i->second));
}
}
for (const auto &poll : base::take(_pollsUpdated)) {
if (const auto i = _pollViews.find(poll); i != _pollViews.end()) {
for (const auto &view : i->second) {
requestViewResize(view);
}
resize.insert(end(resize), begin(i->second), end(i->second));
}
}
for (const auto &view : resize) {
requestViewResize(view);
}
}
rpl::producer<not_null<WebPageData*>> Session::webPageUpdates() const {