Alexandra Betouni 8cab96fd24 feat(desktop/chat): Updated create new chat/group flow
As per new designs

Closes #4781
2022-03-11 14:31:51 -05:00

50 lines
1.3 KiB
QML

import QtQuick 2.13
import utils 1.0
QtObject {
id: root
property var contactsModule
property var globalUtilsInst: globalUtils
property var mainModuleInst: mainModule
property string myPublicKey: userProfile.pubKey
property var myContactsModel: contactsModule.myContactsModel
property var blockedContactsModel: contactsModule.blockedContactsModel
function resolveENS(value) {
root.mainModuleInst.resolveENS(value, "")
}
function generateAlias(pubKey) {
return root.globalUtilsInst.generateAlias(pubKey)
}
function joinPrivateChat(pubKey) {
Global.changeAppSectionBySectionType(Constants.appSection.chat)
let chatCommunitySectionModule = root.mainModuleInst.getChatSectionModule()
chatCommunitySectionModule.createOneToOneChat("", pubKey, "")
}
function addContact(pubKey) {
root.contactsModule.addContact(pubKey)
}
function unblockContact(pubKey) {
root.contactsModule.unblockContact(pubKey)
}
function blockContact(pubKey) {
root.contactsModule.blockContact(pubKey)
}
function removeContact(pubKey) {
root.contactsModule.removeContact(pubKey)
}
function changeContactNickname(pubKey, nickname) {
root.contactsModule.changeContactNickname(pubKey, nickname)
}
}