mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
parent
b45cc15e32
commit
ad4838e4f8
@ -40,7 +40,7 @@ Item {
|
||||
property int chatsCount: parentModule && parentModule.model ? parentModule.model.count : 0
|
||||
property int activeChatType: parentModule && parentModule.activeItem.type
|
||||
property bool stickersLoaded: false
|
||||
property var contactDetails: activeChatType === Constants.chatType.oneToOne && Utils.getContactDetailsAsJson(root.activeChatId, false)
|
||||
property var contactDetails: null
|
||||
property bool isUserAdded: root.contactDetails && root.contactDetails.isAdded
|
||||
|
||||
signal openAppSearch()
|
||||
@ -107,6 +107,21 @@ Item {
|
||||
root.rootStore.createChatStickerPackId = "";
|
||||
}
|
||||
|
||||
function updateContactDetails() {
|
||||
contactDetails = activeChatType === Constants.chatType.oneToOne && Utils.getContactDetailsAsJson(root.activeChatId, false)
|
||||
}
|
||||
|
||||
onActiveChatIdChanged: root.updateContactDetails()
|
||||
|
||||
Connections {
|
||||
target: root.contactsStore.myContactsModel
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
if (pubKey === root.activeChatId)
|
||||
root.updateContactDetails()
|
||||
}
|
||||
}
|
||||
|
||||
EmptyChatPanel {
|
||||
anchors.fill: parent
|
||||
visible: root.activeChatId === "" || root.chatsCount == 0
|
||||
@ -140,6 +155,7 @@ Item {
|
||||
sendTransactionWithEnsModal: cmpSendTransactionWithEns
|
||||
stickersLoaded: root.stickersLoaded
|
||||
isBlocked: model.blocked
|
||||
isUserAdded: root.isUserAdded
|
||||
isActiveChannel: chatLoader.visible
|
||||
onOpenStickerPackPopup: {
|
||||
root.openStickerPackPopup(stickerPackId)
|
||||
|
@ -53,6 +53,7 @@ ColumnLayout {
|
||||
property Component sendTransactionWithEnsModal
|
||||
|
||||
property bool isBlocked: false
|
||||
property bool isUserAdded: false
|
||||
|
||||
property bool stickersLoaded: false
|
||||
|
||||
@ -176,7 +177,8 @@ ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.current.smallPadding
|
||||
|
||||
enabled: root.activeSectionData.joined && !root.activeSectionData.amIBanned
|
||||
enabled: root.activeSectionData.joined && !root.activeSectionData.amIBanned &&
|
||||
!(chatType === Constants.chatType.oneToOne && !root.isUserAdded)
|
||||
|
||||
store: root.rootStore
|
||||
usersStore: root.usersStore
|
||||
|
@ -1337,6 +1337,8 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
onEnabledChanged: if (!enabled) text = ""
|
||||
|
||||
cursorDelegate: Rectangle {
|
||||
color: Theme.palette.primaryColor1
|
||||
implicitWidth: 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user