diff --git a/qml/pages/NewChatPage.qml b/qml/pages/NewChatPage.qml index 606710d..42b3933 100644 --- a/qml/pages/NewChatPage.qml +++ b/qml/pages/NewChatPage.qml @@ -96,7 +96,6 @@ Page { tertiaryText { maximumLineCount: 1 text: Functions.getChatPartnerStatusText(modelData.status["@type"], modelData.status.was_online); - elide: Text.ElideRight } onClicked: { diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp index 91d5fa0..84634fe 100644 --- a/src/tdlibwrapper.cpp +++ b/src/tdlibwrapper.cpp @@ -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 userIdIterator(userIds); while (userIdIterator.hasNext()) { diff --git a/src/tdlibwrapper.h b/src/tdlibwrapper.h index 9a0142a..d2d3268 100644 --- a/src/tdlibwrapper.h +++ b/src/tdlibwrapper.h @@ -277,7 +277,6 @@ private: QString activeChatSearchName; bool joinChatRequested; - bool contactsRequested; };