2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

fixed adding contacts from shared contacts

This commit is contained in:
John Preston
2015-09-02 13:20:33 +03:00
parent ad089cb8da
commit 4d7e90f7e9
8 changed files with 28 additions and 23 deletions

View File

@@ -70,6 +70,9 @@ namespace {
typedef QMap<HistoryItem*, QMap<HistoryReply*, bool> > RepliesTo;
RepliesTo repliesTo;
typedef QMap<int32, QString> SharedContactPhones;
SharedContactPhones sharedContactPhones;
Histories histories;
typedef QHash<MsgId, HistoryItem*> MsgsData;
@@ -1725,6 +1728,7 @@ namespace App {
::audioItems.clear();
::documentItems.clear();
::webPageItems.clear();
::sharedContactPhones.clear();
::repliesTo.clear();
lastPhotos.clear();
lastPhotosMap.clear();
@@ -2117,6 +2121,14 @@ namespace App {
return ::webPageItems;
}
void regSharedContactPhone(int32 userId, const QString &phone) {
::sharedContactPhones[userId] = phone;
}
QString phoneFromSharedContact(int32 userId) {
return ::sharedContactPhones.value(userId);
}
void regMuted(PeerData *peer, int32 changeIn) {
::mutedPeers.insert(peer, true);
if (App::main()) App::main()->updateMutedIn(changeIn);