2021-12-31 12:29:51 +00:00
|
|
|
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
|
|
|
|
|
2022-01-04 12:06:05 +00:00
|
|
|
function resolveENS(value) {
|
|
|
|
root.mainModuleInst.resolveENS(value, "")
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function generateAlias(pubKey) {
|
|
|
|
return root.globalUtilsInst.generateAlias(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function joinPrivateChat(pubKey) {
|
|
|
|
Global.changeAppSectionBySectionType(Constants.appSection.chat)
|
|
|
|
let chatCommunitySectionModule = root.mainModuleInst.getChatSectionModule()
|
2022-02-15 21:00:05 +00:00
|
|
|
chatCommunitySectionModule.createOneToOneChat("", pubKey, "")
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|