fix(contacts) fixed bug in add contacts function

This commit is contained in:
Alexandra Betouni 2021-11-24 00:07:28 +02:00 committed by Sale Djenic
parent 7643c6228c
commit c4bb7c7cf2
1 changed files with 5 additions and 3 deletions

View File

@ -34,7 +34,7 @@ Item {
property string contactToRemove: ""
property string activeChatId: root.rootStore.chatsModelInst.channelView.activeChannel.id
property bool isBlocked: root.rootStore.contactsModuleInst.model.isContactBlocked(activeChatId)
property bool isContact: root.rootStore.contactsModuleInst.model.isAdded(activeChatId)
property bool isContact: root.rootStore.isContactAdded(activeChatId)
// property bool contactRequestReceived: root.rootStore.contactsModuleInst.model.contactRequestReceived(activeChatId)
property string currentNotificationChatId
property string currentNotificationCommunityId
@ -405,8 +405,10 @@ Item {
Layout.bottomMargin: Style.current.bigPadding
isContact: root.isContact
visible: root.rootStore.chatsModelInst.channelView.activeChannel.chatType === Constants.chatTypeOneToOne
&& (!isContact /*|| !contactRequestReceived*/)
onAddContactClicked: root.rootStore.contactsModuleInst.addContact(activeChatId)
&& (!root.isContact /*|| !contactRequestReceived*/)
onAddContactClicked: {
root.rootStore.addContact(activeChatId);
}
}
}