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
|
|
|
|
|
2022-03-24 20:55:22 +00:00
|
|
|
property var myContactsModel: contactsModule.myMutualContactsModel
|
|
|
|
property var blockedContactsModel: contactsModule.blockedContactsModel
|
|
|
|
property var receivedContactRequestsModel: contactsModule.receivedContactRequestsModel
|
|
|
|
property var sentContactRequestsModel: contactsModule.sentContactRequestsModel
|
|
|
|
property var receivedButRejectedContactRequestsModel: contactsModule.receivedButRejectedContactRequestsModel
|
|
|
|
property var sentButRejectedContactRequestsModel: contactsModule.sentButRejectedContactRequestsModel
|
2022-03-15 15:55:18 +00:00
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2022-03-28 14:42:26 +00:00
|
|
|
function getFromClipboard() {
|
|
|
|
return root.globalUtilsInst.getFromClipboard()
|
|
|
|
}
|
|
|
|
|
2022-03-25 11:33:30 +00:00
|
|
|
function isMyMutualContact(pubKey) {
|
|
|
|
return root.contactsModule.isMyMutualContact(pubKey)
|
|
|
|
}
|
|
|
|
|
2021-12-31 12:29:51 +00:00
|
|
|
function joinPrivateChat(pubKey) {
|
|
|
|
Global.changeAppSectionBySectionType(Constants.appSection.chat)
|
2022-03-24 20:55:22 +00:00
|
|
|
root.contactsModule.addContact(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)
|
|
|
|
}
|
2022-03-15 15:55:18 +00:00
|
|
|
|
|
|
|
function acceptContactRequest(pubKey) {
|
2022-03-24 20:55:22 +00:00
|
|
|
root.contactsModule.addContact(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function rejectContactRequest(pubKey) {
|
2022-03-24 20:55:22 +00:00
|
|
|
root.contactsModule.rejectContactRequest(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
|
|
|
|
2022-03-24 20:55:22 +00:00
|
|
|
function removeContactRequestRejection(pubKey) {
|
|
|
|
root.contactsModule.removeContactRequestRejection(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|