Uses MatriqueRoom inherited from QMatrixClient::Room and rewrite related
objects.
This commit is contained in:
@@ -303,20 +303,7 @@ Item {
|
||||
|
||||
contentItem: MaterialIcon { icon: "\ue226" }
|
||||
|
||||
onClicked: {
|
||||
var fileTransferProgressCallback = function(id, sent, total) {
|
||||
inputField.progress = sent / total
|
||||
}
|
||||
var completedCallback = function(id, localFile, mxcUrl) {
|
||||
inputField.progress = 0
|
||||
currentRoom.fileTransferCompleted.disconnect(fileTransferProgressCallback)
|
||||
currentRoom.fileTransferCompleted.disconnect(completedCallback)
|
||||
}
|
||||
|
||||
currentRoom.fileTransferProgress.connect(fileTransferProgressCallback)
|
||||
currentRoom.fileTransferCompleted.connect(completedCallback)
|
||||
matriqueController.uploadFile(currentRoom)
|
||||
}
|
||||
onClicked: currentRoom.chooseAndUploadFile()
|
||||
}
|
||||
|
||||
TextField {
|
||||
@@ -340,14 +327,6 @@ Item {
|
||||
|
||||
background: Rectangle {
|
||||
color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
|
||||
|
||||
Rectangle {
|
||||
z: 5
|
||||
width: inputField.width * inputField.progress
|
||||
height: parent.height
|
||||
color: Material.accent
|
||||
opacity: 0.4
|
||||
}
|
||||
}
|
||||
|
||||
function postMessage(text) {
|
||||
|
||||
@@ -217,8 +217,8 @@ Item {
|
||||
|
||||
contentItem: Label { text: "Accept this invitation?" }
|
||||
|
||||
onAccepted: matriqueController.acceptRoom(currentRoom)
|
||||
onRejected: matriqueController.rejectRoom(currentRoom)
|
||||
onAccepted: currentRoom.acceptInvitation()
|
||||
onRejected: currentRoom.rejectInvitation()
|
||||
}
|
||||
|
||||
Menu {
|
||||
@@ -243,7 +243,7 @@ Item {
|
||||
}
|
||||
MenuItem {
|
||||
text: "Leave Room"
|
||||
onTriggered: matriqueController.forgetRoom(currentRoom.id)
|
||||
onTriggered: currentRoom.forget()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +36,13 @@ Page {
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Logout"
|
||||
highlighted: true
|
||||
text: "Logout"
|
||||
highlighted: true
|
||||
|
||||
onClicked: matriqueController.logout()
|
||||
onClicked: {
|
||||
matriqueController.logout()
|
||||
Qt.quit()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user