Use Remorse.popupAction instead of RemorseItem

RemorseItem sets anchors which we can't have in a Column
This commit is contained in:
nephros 2021-12-15 12:17:05 +01:00
parent 8349cb4377
commit a5e5e36083

View file

@ -321,18 +321,14 @@ AccordionItem {
height: userInformationLoader.height height: userInformationLoader.height
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
enabled: userInformationLoader.status == Loader.Ready enabled: userInformationLoader.status == Loader.Ready
function showRemorseItem() {
remorse.execute(logOutItem, qsTr("Logged out"), function() {
tdLibWrapper.logout();
pageStack.pop();
});
}
RemorseItem { id: remorse }
Button { Button {
id: logOutButton id: logOutButton
text: qsTr("Log Out") text: qsTr("Log Out")
anchors.centerIn: parent anchors.centerIn: parent
onClicked: logOutItem.showRemorseItem() onClicked: Remorse.popupAction(settingsPage, qsTr("Logged out"), function() {
tdLibWrapper.logout();
pageStack.pop();
});
} }
} }
} }