2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move updates handling MainWidget -> Api::Updates.

This commit is contained in:
John Preston
2020-06-11 13:41:03 +04:00
parent ee43027bea
commit 0b028b959b
30 changed files with 2526 additions and 2218 deletions

View File

@@ -549,8 +549,15 @@ public:
void notifyWebPageUpdateDelayed(not_null<WebPageData*> page);
void notifyGameUpdateDelayed(not_null<GameData*> game);
void notifyPollUpdateDelayed(not_null<PollData*> poll);
bool hasPendingWebPageGamePollNotification() const;
[[nodiscard]] bool hasPendingWebPageGamePollNotification() const;
void sendWebPageGamePollNotifications();
[[nodiscard]] rpl::producer<not_null<WebPageData*>> webPageUpdates() const;
void channelDifferenceTooLong(not_null<ChannelData*> channel);
[[nodiscard]] rpl::producer<not_null<ChannelData*>> channelDifferenceTooLong() const;
void historyOutboxRead(not_null<History*> history);
[[nodiscard]] rpl::producer<not_null<History*>> historyOutboxReads() const;
void registerItemView(not_null<ViewElement*> view);
void unregisterItemView(not_null<ViewElement*> view);
@@ -868,6 +875,10 @@ private:
base::flat_set<not_null<GameData*>> _gamesUpdated;
base::flat_set<not_null<PollData*>> _pollsUpdated;
rpl::event_stream<not_null<WebPageData*>> _webpageUpdates;
rpl::event_stream<not_null<ChannelData*>> _channelDifferenceTooLong;
rpl::event_stream<not_null<History*>> _historyOutboxReads;
base::flat_multi_map<TimeId, not_null<PollData*>> _pollsClosings;
base::Timer _pollsClosingTimer;