diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index a7a52fa4b..0238f39df 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -28,7 +28,29 @@ Kirigami.ScrollablePage { signal switchRoomUp() signal switchRoomDown() - title: currentRoom.name + Connections { + target: roomManager.actionsHandler + onShowMessage: { + page.header.contentItem.text = message; + page.header.contentItem.type = messageType === ActionsHandler.Error ? Kirigami.MessageType.Error : Kirigami.MessageType.Information; + page.header.contentItem.visible = true; + } + + onHideMessage: page.header.contentItem.visible = false + } + + header: QQC2.Control { + height: visible ? implicitHeight : 0 + visible: contentItem.visible + padding: Kirigami.Units.smallSpacing + contentItem: Kirigami.InlineMessage { + showCloseButton: true + visible: false + } + } + + title: currentRoom.displayName + titleDelegate: Component { RowLayout { visible: !Kirigami.Settings.isMobile