summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-02-11 23:39:11 +0530
committerJedi18 <targetakhil@gmail.com>2021-02-11 23:39:11 +0530
commita7d7d18e92ec30977009e0947179dbc58ccb9e26 (patch)
treefc30721a99268d57ae519648bc2cde1b18f35b6b /resources
parentadded roomversion, roomid etc (diff)
downloadnheko-a7d7d18e92ec30977009e0947179dbc58ccb9e26.tar.xz
shifted room avatar changing
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/RoomSettings.qml47
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 {