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

Poll data and updates handling added.

This commit is contained in:
John Preston
2018-12-18 09:43:11 +04:00
parent 099440d008
commit 47bdeeef9a
13 changed files with 393 additions and 20 deletions

View File

@@ -4246,7 +4246,7 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
// Update web page anyway.
Auth().data().webpage(d.vwebpage);
_history->updatePreview();
Auth().data().sendWebPageGameNotifications();
Auth().data().sendWebPageGamePollNotifications();
ptsUpdateAndApply(d.vpts.v, d.vpts_count.v, update);
} break;
@@ -4257,7 +4257,7 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
// Update web page anyway.
Auth().data().webpage(d.vwebpage);
_history->updatePreview();
Auth().data().sendWebPageGameNotifications();
Auth().data().sendWebPageGamePollNotifications();
auto channel = App::channelLoaded(d.vchannel_id.v);
if (channel && !_handlingChannelDifference) {
@@ -4271,6 +4271,10 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
}
} break;
case mtpc_updateMessagePoll: {
Auth().data().applyPollUpdate(update.c_updateMessagePoll());
} break;
case mtpc_updateUserTyping: {
auto &d = update.c_updateUserTyping();
const auto userId = peerFromUser(d.vuser_id);