mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Push recent requests from requests box to the bar.
This commit is contained in:
@@ -759,6 +759,15 @@ void InviteLinks::requestMoreLinks(
|
||||
}).send();
|
||||
}
|
||||
|
||||
void InviteLinks::pushRecentRequests(RecentRequests &&requests) {
|
||||
_recentRequestsLocal.fire(std::move(requests));
|
||||
}
|
||||
|
||||
auto InviteLinks::recentRequestsLocal() const
|
||||
-> rpl::producer<RecentRequests> {
|
||||
return _recentRequestsLocal.events();
|
||||
}
|
||||
|
||||
void InviteLinks::editPermanentLink(
|
||||
not_null<PeerData*> peer,
|
||||
const QString &link) {
|
||||
|
@@ -132,6 +132,13 @@ public:
|
||||
bool revoked,
|
||||
Fn<void(Links)> done);
|
||||
|
||||
struct RecentRequests {
|
||||
not_null<PeerData*> peer;
|
||||
std::vector<not_null<UserData*>> users;
|
||||
};
|
||||
void pushRecentRequests(RecentRequests &&requests);
|
||||
[[nodiscard]] rpl::producer<RecentRequests> recentRequestsLocal() const;
|
||||
|
||||
private:
|
||||
struct LinkKey {
|
||||
not_null<PeerData*> peer;
|
||||
@@ -216,6 +223,7 @@ private:
|
||||
base::flat_map<
|
||||
std::pair<not_null<PeerData*>, not_null<UserData*>>,
|
||||
ProcessRequest> _processRequests;
|
||||
rpl::event_stream<RecentRequests> _recentRequestsLocal;
|
||||
|
||||
rpl::event_stream<Update> _updates;
|
||||
|
||||
|
Reference in New Issue
Block a user