Fix imageprovider.
This commit is contained in:
15
qml/Room.qml
15
qml/Room.qml
@@ -22,14 +22,13 @@ Page {
|
||||
id: roomListForm
|
||||
|
||||
Layout.fillHeight: true
|
||||
// Layout.preferredWidth: {
|
||||
// if (page.width > 560) {
|
||||
// return page.width * 0.4;
|
||||
// } else {
|
||||
// return 80;
|
||||
// }
|
||||
// }
|
||||
Layout.preferredWidth: 320
|
||||
Layout.preferredWidth: {
|
||||
if (page.width > 560) {
|
||||
return page.width * 0.4;
|
||||
} else {
|
||||
return 80;
|
||||
}
|
||||
}
|
||||
Layout.maximumWidth: 360
|
||||
|
||||
listModel: roomListModel
|
||||
|
||||
@@ -45,6 +45,8 @@ Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
visible: parent.width > 80
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
@@ -79,9 +81,9 @@ Item {
|
||||
var roomCount = listModel.rowCount();
|
||||
for (var i = 0; i < roomCount; i++){
|
||||
var roomName = "";
|
||||
if (listModel.roomAt(i).name != "") {
|
||||
if (listModel.roomAt(i).name !== "") {
|
||||
roomName = listModel.roomAt(i).name;
|
||||
} else if (model.alias != "") {
|
||||
} else if (model.alias !== "") {
|
||||
roomName = listModel.roomAt(i).alias;
|
||||
} else {
|
||||
roomName = listModel.roomAt(i).id;
|
||||
|
||||
@@ -16,7 +16,7 @@ Item {
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
visible: currentRoom == null
|
||||
visible: currentRoom === null
|
||||
Pane {
|
||||
anchors.fill: parent
|
||||
}
|
||||
@@ -32,7 +32,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
visible: currentRoom != null
|
||||
visible: currentRoom !== null
|
||||
|
||||
Pane {
|
||||
z: 10
|
||||
@@ -61,7 +61,7 @@ Item {
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: currentRoom != null ? currentRoom.name : ""
|
||||
text: currentRoom !== null ? currentRoom.displayName : ""
|
||||
font.pointSize: 16
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
@@ -69,7 +69,7 @@ Item {
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: currentRoom != null ? currentRoom.topic : ""
|
||||
text: currentRoom !== null ? currentRoom.topic : ""
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
@@ -138,7 +138,9 @@ ApplicationWindow {
|
||||
|
||||
SideNavButton {
|
||||
contentItem: MaterialIcon { icon: "\ue879"; color: "white" }
|
||||
onClicked: Qt.quit()
|
||||
onClicked: {
|
||||
Qt.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,7 +155,6 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
imageProvider.setConnection(matriqueController.connection)
|
||||
imageProvider.connection = matriqueController.connection
|
||||
|
||||
console.log(matriqueController.homeserver, matriqueController.userID, matriqueController.token)
|
||||
|
||||
Reference in New Issue
Block a user