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

Remove some more Auth() calls.

This commit is contained in:
John Preston
2020-06-08 13:06:50 +04:00
parent bede709f6b
commit 3878a1b212
67 changed files with 380 additions and 299 deletions

View File

@@ -150,9 +150,9 @@ rpl::producer<bool> NotificationsEnabledValue(not_null<PeerData*> peer) {
peer,
Notify::PeerUpdate::Flag::NotificationsEnabled
) | rpl::map([] { return rpl::empty_value(); }),
Auth().data().defaultNotifyUpdates(peer)
) | rpl::map([peer] {
return !Auth().data().notifyIsMuted(peer);
peer->owner().defaultNotifyUpdates(peer)
) | rpl::map([=] {
return !peer->owner().notifyIsMuted(peer);
}) | rpl::distinct_until_changed();
}
@@ -322,6 +322,7 @@ rpl::producer<int> SharedMediaCountValue(
auto aroundId = 0;
auto limit = 0;
auto updated = SharedMediaMergedViewer(
&peer->session(),
SharedMediaMergedKey(
SparseIdsMergedSlice::Key(
peer->id,
@@ -391,7 +392,7 @@ rpl::producer<bool> ScamValue(not_null<PeerData*> peer) {
// return rpl::single(
// Data::FeedUpdate{ feed, Flag::Channels }
// ) | rpl::then(
// Auth().data().feedUpdated()
// feed->owner().feedUpdated()
// ) | rpl::filter([=](const Data::FeedUpdate &update) {
// return (update.feed == feed) && (update.flag == Flag::Channels);
// }) | rpl::filter([=] {