2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Remove App::app(), App::uploader(), App::api().

Also use Auth() instead of AuthSession::Current*().
This commit is contained in:
John Preston
2017-08-04 16:54:32 +02:00
parent 417f5684dc
commit ab35829358
72 changed files with 450 additions and 445 deletions

View File

@@ -4075,7 +4075,7 @@ PeerData *_readPeer(FileReadDescriptor &from, int32 fileVersion = 0) {
}
from.stream >> onlineTill >> contact >> botInfoVersion;
bool showPhone = !isServiceUser(user->id) && (user->id != AuthSession::CurrentUserPeerId()) && (contact <= 0);
bool showPhone = !isServiceUser(user->id) && (user->id != Auth().userPeerId()) && (contact <= 0);
QString pname = (showPhone && !phone.isEmpty()) ? App::formatPhone(phone) : QString();
if (!wasLoaded) {
@@ -4091,7 +4091,7 @@ PeerData *_readPeer(FileReadDescriptor &from, int32 fileVersion = 0) {
user->botInfo->inlinePlaceholder = inlinePlaceholder;
}
if (user->id == AuthSession::CurrentUserPeerId()) {
if (user->id == Auth().userPeerId()) {
user->input = MTP_inputPeerSelf();
user->inputUser = MTP_inputUserSelf();
} else {
@@ -4335,7 +4335,7 @@ void readSavedPeers() {
peers.push_back(peer);
}
if (App::api()) App::api()->requestPeers(peers);
Auth().api().requestPeers(peers);
}
void addSavedPeer(PeerData *peer, const QDateTime &position) {