Check contacts requested via extra-attribute
This commit is contained in:
parent
51cad07231
commit
20b773ac59
3 changed files with 3 additions and 6 deletions
|
@ -96,7 +96,6 @@ Page {
|
|||
tertiaryText {
|
||||
maximumLineCount: 1
|
||||
text: Functions.getChatPartnerStatusText(modelData.status["@type"], modelData.status.was_online);
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace {
|
|||
const QString _EXTRA("@extra");
|
||||
}
|
||||
|
||||
TDLibWrapper::TDLibWrapper(AppSettings *appSettings, MceInterface *mceInterface, QObject *parent) : QObject(parent), joinChatRequested(false), contactsRequested(false)
|
||||
TDLibWrapper::TDLibWrapper(AppSettings *appSettings, MceInterface *mceInterface, QObject *parent) : QObject(parent), joinChatRequested(false)
|
||||
{
|
||||
LOG("Initializing TD Lib...");
|
||||
this->appSettings = appSettings;
|
||||
|
@ -793,9 +793,9 @@ void TDLibWrapper::getDeepLinkInfo(const QString &link)
|
|||
void TDLibWrapper::getContacts()
|
||||
{
|
||||
LOG("Retrieving contacts");
|
||||
this->contactsRequested = true;
|
||||
QVariantMap requestObject;
|
||||
requestObject.insert(_TYPE, "getContacts");
|
||||
requestObject.insert(_EXTRA, "contactsRequested");
|
||||
this->sendRequest(requestObject);
|
||||
}
|
||||
|
||||
|
@ -1187,9 +1187,8 @@ void TDLibWrapper::handleOpenWithChanged()
|
|||
|
||||
void TDLibWrapper::handleUsersReceived(const QString &extra, const QVariantList &userIds, int totalUsers)
|
||||
{
|
||||
if (this->contactsRequested) {
|
||||
if (extra == "contactsRequested") {
|
||||
LOG("Received contacts list...");
|
||||
this->contactsRequested = false;
|
||||
contacts.clear();
|
||||
QListIterator<QVariant> userIdIterator(userIds);
|
||||
while (userIdIterator.hasNext()) {
|
||||
|
|
|
@ -277,7 +277,6 @@ private:
|
|||
|
||||
QString activeChatSearchName;
|
||||
bool joinChatRequested;
|
||||
bool contactsRequested;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue