Fix crashing when logging out.
That's a complex issue. Yay!
This commit is contained in:
@@ -2,70 +2,37 @@ import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import Matrique 0.1
|
||||
import Matrique.Settings 0.1
|
||||
|
||||
import "component"
|
||||
import "form"
|
||||
|
||||
Page {
|
||||
// Page {
|
||||
// id: accountForm
|
||||
// parent: null
|
||||
|
||||
// padding: 64
|
||||
|
||||
// ColumnLayout {
|
||||
// RowLayout {
|
||||
// Layout.preferredHeight: 60
|
||||
|
||||
// ImageStatus {
|
||||
// Layout.preferredWidth: height
|
||||
// Layout.fillHeight: true
|
||||
|
||||
// source: matriqueController.isLogin ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
|
||||
// displayText: matriqueController.isLogin && connection.localUser.displayName ? connection.localUser.displayName : ""
|
||||
// }
|
||||
|
||||
// ColumnLayout {
|
||||
// Layout.fillWidth: true
|
||||
// Layout.fillHeight: true
|
||||
|
||||
// Label {
|
||||
// font.pointSize: 18
|
||||
// text: matriqueController.isLogin ? connection.localUser.displayName : ""
|
||||
// }
|
||||
|
||||
// Label {
|
||||
// font.pointSize: 12
|
||||
// text: matriqueController.isLogin ? connection.localUser.id : ""
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Button {
|
||||
// text: "Logout"
|
||||
// highlighted: true
|
||||
|
||||
// onClicked: {
|
||||
// matriqueController.logout()
|
||||
// Qt.quit()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Page{
|
||||
property alias listModel: accountSettingsListView.model
|
||||
Page {
|
||||
id: accountForm
|
||||
|
||||
parent: null
|
||||
|
||||
// Button {
|
||||
// flat: true
|
||||
// highlighted: true
|
||||
// text: "Login"
|
||||
padding: 64
|
||||
|
||||
// onClicked: stackView.push(loginPage)
|
||||
// }
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
|
||||
id: accountSettingsListView
|
||||
|
||||
spacing: 0
|
||||
|
||||
delegate: RowLayout{
|
||||
Label {
|
||||
text: accountID
|
||||
}
|
||||
ItemDelegate {
|
||||
text: "Logout"
|
||||
onClicked: matriqueController.logout(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Page {
|
||||
|
||||
Reference in New Issue
Block a user