mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Poll data and updates handling added.
This commit is contained in:
@@ -246,6 +246,7 @@ public:
|
||||
not_null<const DocumentData*> document);
|
||||
void requestDocumentViewRepaint(not_null<const DocumentData*> document);
|
||||
void markMediaRead(not_null<const DocumentData*> document);
|
||||
void requestPollViewRepaint(not_null<const PollData*> poll);
|
||||
|
||||
not_null<PhotoData*> photo(PhotoId id);
|
||||
not_null<PhotoData*> photo(const MTPPhoto &data);
|
||||
@@ -330,6 +331,11 @@ public:
|
||||
not_null<GameData*> original,
|
||||
const MTPGame &data);
|
||||
|
||||
not_null<PollData*> poll(PollId id);
|
||||
not_null<PollData*> poll(const MTPPoll &data);
|
||||
not_null<PollData*> poll(const MTPDmessageMediaPoll &data);
|
||||
void applyPollUpdate(const MTPDupdateMessagePoll &update);
|
||||
|
||||
not_null<LocationData*> location(const LocationCoords &coords);
|
||||
|
||||
void registerPhotoItem(
|
||||
@@ -362,6 +368,12 @@ public:
|
||||
void unregisterGameView(
|
||||
not_null<const GameData*> game,
|
||||
not_null<ViewElement*> view);
|
||||
void registerPollView(
|
||||
not_null<const PollData*> poll,
|
||||
not_null<ViewElement*> view);
|
||||
void unregisterPollView(
|
||||
not_null<const PollData*> poll,
|
||||
not_null<ViewElement*> view);
|
||||
void registerContactView(
|
||||
UserId contactId,
|
||||
not_null<ViewElement*> view);
|
||||
@@ -386,7 +398,9 @@ public:
|
||||
|
||||
void notifyWebPageUpdateDelayed(not_null<WebPageData*> page);
|
||||
void notifyGameUpdateDelayed(not_null<GameData*> game);
|
||||
void sendWebPageGameNotifications();
|
||||
void notifyPollUpdateDelayed(not_null<PollData*> poll);
|
||||
bool hasPendingWebPageGamePollNotification() const;
|
||||
void sendWebPageGamePollNotifications();
|
||||
|
||||
void stopAutoplayAnimations();
|
||||
|
||||
@@ -604,21 +618,27 @@ private:
|
||||
std::unordered_map<
|
||||
WebPageId,
|
||||
std::unique_ptr<WebPageData>> _webpages;
|
||||
std::unordered_map<
|
||||
LocationCoords,
|
||||
std::unique_ptr<LocationData>> _locations;
|
||||
std::map<
|
||||
not_null<const WebPageData*>,
|
||||
base::flat_set<not_null<HistoryItem*>>> _webpageItems;
|
||||
std::map<
|
||||
not_null<const WebPageData*>,
|
||||
base::flat_set<not_null<ViewElement*>>> _webpageViews;
|
||||
std::unordered_map<
|
||||
LocationCoords,
|
||||
std::unique_ptr<LocationData>> _locations;
|
||||
std::unordered_map<
|
||||
PollId,
|
||||
std::unique_ptr<PollData>> _polls;
|
||||
std::unordered_map<
|
||||
GameId,
|
||||
std::unique_ptr<GameData>> _games;
|
||||
std::map<
|
||||
not_null<const GameData*>,
|
||||
base::flat_set<not_null<ViewElement*>>> _gameViews;
|
||||
std::map<
|
||||
not_null<const PollData*>,
|
||||
base::flat_set<not_null<ViewElement*>>> _pollViews;
|
||||
std::map<
|
||||
UserId,
|
||||
base::flat_set<not_null<HistoryItem*>>> _contactItems;
|
||||
@@ -631,6 +651,7 @@ private:
|
||||
|
||||
base::flat_set<not_null<WebPageData*>> _webpagesUpdated;
|
||||
base::flat_set<not_null<GameData*>> _gamesUpdated;
|
||||
base::flat_set<not_null<PollData*>> _pollsUpdated;
|
||||
|
||||
std::deque<Dialogs::Key> _pinnedDialogs;
|
||||
base::flat_map<FeedId, std::unique_ptr<Feed>> _feeds;
|
||||
|
Reference in New Issue
Block a user