Ability to change room avatar.

This commit is contained in:
Black Hat
2019-07-02 22:00:43 +08:00
parent a8cc5f4861
commit e561265e5c
6 changed files with 47 additions and 2 deletions

View File

@@ -30,6 +30,24 @@ Dialog {
hint: room.displayName
source: room.avatarMediaId
RippleEffect {
anchors.fill: parent
circular: true
onClicked: {
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
fileDialog.chosen.connect(function(path) {
if (!path) return
room.changeAvatar(path)
})
fileDialog.open()
}
}
}
ColumnLayout {
@@ -230,7 +248,7 @@ Dialog {
text: "Set background image"
onClicked: {
var fileDialog = chatBackgroundDialog.createObject(ApplicationWindow.overlay)
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
fileDialog.chosen.connect(function(path) {
if (!path) return
@@ -262,7 +280,7 @@ Dialog {
}
Component {
id: chatBackgroundDialog
id: openFileDialog
OpenFileDialog {}
}