shifted room avatar changing
1 files changed, 44 insertions, 3 deletions
diff --git a/resources/qml/RoomSettings.qml b/resources/qml/RoomSettings.qml
index ee824ba0..5d2baba1 100644
--- a/resources/qml/RoomSettings.qml
+++ b/resources/qml/RoomSettings.qml
@@ -33,12 +33,53 @@ ApplicationWindow {
spacing: 10
Avatar {
- url: ""
+ url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
height: 130
width: 130
- displayName: ""
- userid: ""
Layout.alignment: Qt.AlignHCenter
+ onClicked: {
+ if(roomSettings.canChangeAvatar) {
+ roomSettings.updateAvatar();
+ }
+ }
+ }
+
+ BusyIndicator {
+ Layout.alignment: Qt.AlignHCenter
+ running: roomSettings.isLoading
+ visible: roomSettings.isLoading
+ }
+
+ Text {
+ id: errorText
+ text: "Error Text"
+ color: "red"
+ visible: opacity > 0
+ opacity: 0
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ SequentialAnimation {
+ id: hideErrorAnimation
+ running: false
+ PauseAnimation {
+ duration: 4000
+ }
+ NumberAnimation {
+ target: errorText
+ property: 'opacity'
+ to: 0
+ duration: 1000
+ }
+ }
+
+ Connections{
+ target: roomSettings
+ onDisplayError: {
+ errorText.text = errorMessage
+ errorText.opacity = 1
+ hideErrorAnimation.restart()
+ }
}
ColumnLayout {
|