fix(@desktop/chat): remove add to contact banner from top bar

fixes #2717
This commit is contained in:
Anthony Laibe 2021-07-23 12:01:26 +02:00 committed by Iuri Matias
parent 5488abcbde
commit 1be169bc7e
3 changed files with 0 additions and 61 deletions

View File

@ -33,7 +33,6 @@ Item {
property bool isConnected: false
property string contactToRemove: ""
property bool showUsers: false
property var doNotShowAddToContactBannerToThose: ([])
property string activeChatId: chatsModel.channelView.activeChannel.id
property bool isBlocked: profileModel.contacts.isContactBlocked(activeChatId)
property bool isContact: profileModel.contacts.isAdded(activeChatId)
@ -295,11 +294,6 @@ Item {
}
}
AddToContactBanner {
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
}
StackLayout {
id: stackLayoutChatMessages
Layout.fillWidth: true

View File

@ -1,54 +0,0 @@
import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import "../../../../../shared"
import "../../../../../shared/status"
Item {
visible: chatsModel.channelView.activeChannel.chatType === Constants.chatTypeOneToOne &&
!isContact &&
!doNotShowAddToContactBannerToThose.includes(activeChatId)
height: 36
SVGImage {
source: "../../../../img/plusSign.svg"
anchors.right: addToContactsTxt.left
anchors.rightMargin: Style.current.smallPadding
anchors.verticalCenter: parent.verticalCenter
layer.enabled: true
layer.effect: ColorOverlay { color: addToContactsTxt.color }
}
StyledText {
id: addToContactsTxt
//% "Add to contacts"
text: qsTrId("add-to-contacts")
color: Style.current.primary
anchors.centerIn: parent
}
Separator {
anchors.bottom: parent.bottom
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: profileModel.contacts.addContact(activeChatId)
}
StatusIconButton {
id: closeBtn
icon.name: "close"
onClicked: {
const newArray = Object.assign([], doNotShowAddToContactBannerToThose)
newArray.push(activeChatId)
doNotShowAddToContactBannerToThose = newArray
}
width: 20
height: 20
anchors.right: parent.right
anchors.rightMargin: Style.current.halfPadding
anchors.verticalCenter: parent.verticalCenter
}
}

View File

@ -101,7 +101,6 @@ DISTFILES += \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterMessageComponent.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterTopBar.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityChannelBadge.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/AddToContactBanner.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandButton.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandModal.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandsPopup.qml \