Add avatar support.
This commit is contained in:
@@ -81,6 +81,7 @@ Item {
|
||||
Text {
|
||||
z: 10
|
||||
text: "Here? No, not here."
|
||||
color: "#424242"
|
||||
anchors.centerIn: parent
|
||||
visible: listView.count === 0
|
||||
}
|
||||
@@ -113,7 +114,7 @@ Item {
|
||||
ImageStatus {
|
||||
width: parent.height
|
||||
height: parent.height
|
||||
source: "qrc:/asset/img/avatar.png"
|
||||
source: "image://mxc/" + avatar
|
||||
}
|
||||
|
||||
Column {
|
||||
|
||||
19
qml/main.qml
19
qml/main.qml
@@ -18,17 +18,16 @@ ApplicationWindow {
|
||||
title: qsTr("Matrique")
|
||||
|
||||
Controller {
|
||||
id: controller
|
||||
|
||||
onIsLoginChanged: console.log("Status:", isLogin)
|
||||
id: matrixController
|
||||
connection: m_connection
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: settings
|
||||
// Settings {
|
||||
// id: settings
|
||||
|
||||
property alias userID: controller.userID
|
||||
property alias token: controller.token
|
||||
}
|
||||
// property var userID
|
||||
// property var token
|
||||
// }
|
||||
|
||||
FontLoader { id: materialFont; source: "qrc:/asset/font/material.ttf" }
|
||||
|
||||
@@ -51,7 +50,7 @@ ApplicationWindow {
|
||||
|
||||
page: Room {
|
||||
id: roomPage
|
||||
roomListModel: controller.roomListModel
|
||||
roomListModel: matrixController.roomListModel//BUG: It will cause random crash as roomListModel may not be initialized.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +71,7 @@ ApplicationWindow {
|
||||
|
||||
page: Login {
|
||||
id: loginPage
|
||||
controller: controller
|
||||
controller: matrixController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user