2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-07 13:46:05 +00:00

Move some calls from App namespace.

This commit is contained in:
John Preston
2019-01-18 16:27:37 +04:00
parent e7804d014d
commit 4111da1dd0
74 changed files with 896 additions and 852 deletions

View File

@@ -76,7 +76,7 @@ rpl::producer<SparseIdsSlice> SharedMediaViewer(
limitBefore,
limitAfter);
auto requestMediaAround = [
peer = App::peer(key.peerId),
peer = Auth().data().peer(key.peerId),
type = key.type
](const SparseIdsSliceBuilder::AroundData &data) {
Auth().api().requestSharedMedia(
@@ -313,7 +313,7 @@ void SharedMediaWithLastSlice::reverse() {
std::optional<PhotoId> SharedMediaWithLastSlice::LastPeerPhotoId(
PeerId peerId) {
if (auto peer = App::peerLoaded(peerId)) {
if (const auto peer = Auth().data().peerLoaded(peerId)) {
return peer->userpicPhotoUnknown()
? std::nullopt
: base::make_optional(peer->userpicPhotoId());