fixup! fixup! Settings: add login info and logout to Profile

This commit is contained in:
nephros 2021-12-15 12:02:32 +01:00
parent 313a4d3827
commit 8349cb4377

View file

@ -35,24 +35,13 @@ AccordionItem {
readonly property var userInformation: tdLibWrapper.getUserInformation() readonly property var userInformation: tdLibWrapper.getUserInformation()
property bool uploadInProgress: false property bool uploadInProgress: false
property variant activeSessions;
property bool loaded : false;
Component.onCompleted: { Component.onCompleted: {
tdLibWrapper.getUserProfilePhotos(userInformation.id, 100, 0); tdLibWrapper.getUserProfilePhotos(userInformation.id, 100, 0);
if (!activeSessions) {
tdLibWrapper.getActiveSessions();
} else {
accordionContent.loaded = true;
}
} }
Connections { Connections {
target: tdLibWrapper target: tdLibWrapper
onSessionsReceived: {
accordionContent.activeSessions = sessions;
accordionContent.loaded = true;
}
onOwnUserUpdated: { onOwnUserUpdated: {
firstNameEditArea.text = userInformation.first_name; firstNameEditArea.text = userInformation.first_name;
lastNameEditArea.text = userInformation.last_name; lastNameEditArea.text = userInformation.last_name;