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

Replace peerMessagesUpdated with notifications.

This commit is contained in:
John Preston
2018-01-18 12:53:49 +03:00
parent 04c8c95634
commit 2dd2ad5cdb
9 changed files with 102 additions and 83 deletions

View File

@@ -238,6 +238,20 @@ rpl::producer<not_null<const History*>> Session::historyCleared() const {
return _historyCleared.events();
}
void Session::notifyHistoryChangeDelayed(not_null<const History*> history) {
_historiesChanged.insert(history);
}
rpl::producer<not_null<const History*>> Session::historyChanged() const {
return _historyChanged.events();
}
void Session::sendHistoryChangeNotifications() {
for (const auto history : base::take(_historiesChanged)) {
_historyChanged.fire_copy(history);
}
}
void Session::removeMegagroupParticipant(
not_null<ChannelData*> channel,
not_null<UserData*> user) {