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

Moved MTP blocked peers from ApiWrap to Api::BlockedPeers.

This commit is contained in:
23rd
2021-08-02 01:57:36 +03:00
committed by John Preston
parent 221ded6d54
commit 0ae260c6e1
11 changed files with 283 additions and 221 deletions

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "settings/settings_privacy_security.h"
#include "api/api_authorizations.h"
#include "api/api_blocked_peers.h"
#include "api/api_self_destruct.h"
#include "api/api_sensitive_content.h"
#include "api/api_global_privacy.h"
@@ -107,8 +108,8 @@ rpl::producer<QString> PrivacyString(
}
rpl::producer<int> BlockedPeersCount(not_null<::Main::Session*> session) {
return session->api().blockedPeersSlice(
) | rpl::map([=](const ApiWrap::BlockedPeersSlice &data) {
return session->api().blockedPeers().slice(
) | rpl::map([](const Api::BlockedPeers::Slice &data) {
return data.total;
});
}
@@ -148,7 +149,7 @@ void SetupPrivacy(
std::move(
updateTrigger
) | rpl::start_with_next([=] {
session->api().reloadBlockedPeers();
session->api().blockedPeers().reload();
}, blockedPeers->lifetime());
using Key = Privacy::Key;