diff --git a/qml/components/chatInformationPage/ChatInformationPageContent.qml b/qml/components/chatInformationPage/ChatInformationPageContent.qml index 6ee54f0..511bc38 100644 --- a/qml/components/chatInformationPage/ChatInformationPageContent.qml +++ b/qml/components/chatInformationPage/ChatInformationPageContent.qml @@ -300,7 +300,8 @@ SilicaFlickable { } leftMargin: imageContainer.getEased((imageContainer.minDimension + Theme.paddingMedium), 0, imageContainer.tweenFactor) + Theme.horizontalPageMargin title: chatInformationPage.chatInformation.title !== "" ? Emoji.emojify(chatInformationPage.chatInformation.title, Theme.fontSizeLarge) : qsTr("Unknown") - description: (chatInformationPage.isPrivateChat || chatInformationPage.isSecretChat) ? ("@"+(chatInformationPage.privateChatUserInformation.username || chatInformationPage.chatPartnerGroupId)) : "" + description: ((chatInformationPage.isPrivateChat || chatInformationPage.isSecretChat) && chatInformationPage.privateChatUserInformation.username) + ? ("@"+chatInformationPage.privateChatUserInformation.username) : "" } SilicaFlickable { @@ -363,6 +364,27 @@ SilicaFlickable { height: imageContainer.hasImage ? imageContainer.maxDimension : 0 } + Label { + id: copyIdText + x: Math.max(headerItem.x + imageContainer.x - groupInfoItem.x + (imageContainer.width - width)/2, 0) + text: chatInformationPage.chatPartnerGroupId + font.pixelSize: Theme.fontSizeSmall + color: copyIdMouseArea.pressed ? Theme.secondaryHighlightColor : Theme.highlightColor + visible: text !== "" + + MouseArea { + id: copyIdMouseArea + anchors { + fill: parent + margins: -Theme.paddingLarge + } + onClicked: { + Clipboard.text = copyIdText.text + appNotification.show(qsTr("ID has been copied to the clipboard.")); + } + } + } + InformationEditArea { visible: canEdit canEdit: !(chatInformationPage.isPrivateChat || chatInformationPage.isSecretChat) && chatInformationPage.groupInformation.status && (chatInformationPage.groupInformation.status.can_change_info || chatInformationPage.groupInformation.status["@type"] === "chatMemberStatusCreator")