adapt_to_changes_in_tdlib #10

Merged
medvedych merged 12 commits from adapt_to_changes_in_tdlib into master 2023-11-19 16:35:17 +03:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 0ba3a8cd7f - Show all commits

View file

@ -143,7 +143,7 @@ AccordionItem {
visible: true visible: true
canEdit: true canEdit: true
headerText: qsTr("Username", "user name of the logged-in profile - header") headerText: qsTr("Username", "user name of the logged-in profile - header")
text: userInformation.username text: userInformation.usernames.editable_username
width: parent.columnWidth width: parent.columnWidth
headerLeftAligned: true headerLeftAligned: true

View file

@ -68,7 +68,7 @@ QVariant ContactsModel::data(const QModelIndex &index, int role) const
case ContactRole::RoleDisplay: return requestedContact; case ContactRole::RoleDisplay: return requestedContact;
case ContactRole::RoleTitle: return QString(requestedContact.value("first_name").toString() + " " + requestedContact.value("last_name").toString()).trimmed(); case ContactRole::RoleTitle: return QString(requestedContact.value("first_name").toString() + " " + requestedContact.value("last_name").toString()).trimmed();
case ContactRole::RoleUserId: return requestedContact.value("id"); case ContactRole::RoleUserId: return requestedContact.value("id");
case ContactRole::RoleUsername: return requestedContact.value("username"); case ContactRole::RoleUsername: return requestedContact.value("usernames").toMap().value("editable_username").toString();
case ContactRole::RolePhotoSmall: return requestedContact.value("profile_photo").toMap().value("small"); case ContactRole::RolePhotoSmall: return requestedContact.value("profile_photo").toMap().value("small");
case ContactRole::RoleUserStatus: return requestedContact.value("status").toMap().value("@type"); case ContactRole::RoleUserStatus: return requestedContact.value("status").toMap().value("@type");
case ContactRole::RoleUserLastOnline: return requestedContact.value("status").toMap().value("was_online"); case ContactRole::RoleUserLastOnline: return requestedContact.value("status").toMap().value("was_online");