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

Move all (item/view/media) maps to Data::Session.

This commit is contained in:
John Preston
2018-01-17 19:21:01 +03:00
parent 7425e80f05
commit 8a56ede187
78 changed files with 2900 additions and 2320 deletions

View File

@@ -171,7 +171,7 @@ void PeerData::setUserpic(
void PeerData::setUserpicPhoto(const MTPPhoto &data) {
auto photoId = [&]() -> PhotoId {
if (auto photo = App::feedPhoto(data)) {
if (const auto photo = Auth().data().photo(data)) {
photo->peer = this;
return photo->id;
}
@@ -353,7 +353,7 @@ const Text &BotCommand::descriptionText() const {
bool UserData::canShareThisContact() const {
return canShareThisContactFast()
|| !App::phoneFromSharedContact(peerToUser(id)).isEmpty();
|| !Auth().data().findContactPhone(peerToUser(id)).isEmpty();
}
void UserData::setContactStatus(ContactStatus status) {