diff options
author | Jedi18 <targetakhil@gmail.com> | 2021-02-11 23:39:11 +0530 |
---|---|---|
committer | Jedi18 <targetakhil@gmail.com> | 2021-02-11 23:39:11 +0530 |
commit | a7d7d18e92ec30977009e0947179dbc58ccb9e26 (patch) | |
tree | fc30721a99268d57ae519648bc2cde1b18f35b6b /resources/qml | |
parent | added roomversion, roomid etc (diff) | |
download | nheko-a7d7d18e92ec30977009e0947179dbc58ccb9e26.tar.xz |
shifted room avatar changing
Diffstat (limited to 'resources/qml')
-rw-r--r-- | resources/qml/RoomSettings.qml | 47 |
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 { |