mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
parent
c85cead983
commit
e160e70121
@ -41,10 +41,6 @@ proc init*(self: Controller) =
|
|||||||
var args = ContactArgs(e)
|
var args = ContactArgs(e)
|
||||||
self.delegate.contactRemoved(args.contactId)
|
self.delegate.contactRemoved(args.contactId)
|
||||||
|
|
||||||
self.events.on(SIGNAL_CONTACT_REJECTION_REMOVED) do(e: Args):
|
|
||||||
var args = ContactArgs(e)
|
|
||||||
self.delegate.contactRequestRejectionRemoved(args.contactId)
|
|
||||||
|
|
||||||
self.events.on(SIGNAL_CONTACT_NICKNAME_CHANGED) do(e: Args):
|
self.events.on(SIGNAL_CONTACT_NICKNAME_CHANGED) do(e: Args):
|
||||||
var args = ContactArgs(e)
|
var args = ContactArgs(e)
|
||||||
self.delegate.contactNicknameChanged(args.contactId)
|
self.delegate.contactNicknameChanged(args.contactId)
|
||||||
@ -127,9 +123,6 @@ proc acceptContactRequest*(self: Controller, publicKey: string, contactRequestId
|
|||||||
proc dismissContactRequest*(self: Controller, publicKey: string, contactRequestId: string) =
|
proc dismissContactRequest*(self: Controller, publicKey: string, contactRequestId: string) =
|
||||||
self.contactsService.dismissContactRequest(publicKey, contactRequestId)
|
self.contactsService.dismissContactRequest(publicKey, contactRequestId)
|
||||||
|
|
||||||
proc removeContactRequestRejection*(self: Controller, publicKey: string) =
|
|
||||||
self.contactsService.removeContactRequestRejection(publicKey)
|
|
||||||
|
|
||||||
proc switchToOrCreateOneToOneChat*(self: Controller, chatId: string) =
|
proc switchToOrCreateOneToOneChat*(self: Controller, chatId: string) =
|
||||||
self.chatService.switchToOrCreateOneToOneChat(chatId, "")
|
self.chatService.switchToOrCreateOneToOneChat(chatId, "")
|
||||||
|
|
||||||
|
@ -51,9 +51,6 @@ method blockContact*(self: AccessInterface, publicKey: string) {.base.} =
|
|||||||
method removeContact*(self: AccessInterface, publicKey: string) {.base.} =
|
method removeContact*(self: AccessInterface, publicKey: string) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method removeContactRequestRejection*(self: AccessInterface, publicKey: string) {.base.} =
|
|
||||||
raise newException(ValueError, "No implementation available")
|
|
||||||
|
|
||||||
# Controller Delegate Interface
|
# Controller Delegate Interface
|
||||||
|
|
||||||
method contactAdded*(self: AccessInterface, publicKey: string) {.base.} =
|
method contactAdded*(self: AccessInterface, publicKey: string) {.base.} =
|
||||||
@ -110,9 +107,6 @@ method declineVerificationRequest*(self: AccessInterface, publicKey: string): vo
|
|||||||
method acceptVerificationRequest*(self: AccessInterface, publicKey: string, response: string): void {.base.} =
|
method acceptVerificationRequest*(self: AccessInterface, publicKey: string, response: string): void {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method contactRequestRejectionRemoved*(self: AccessInterface, publicKey: string) {.base.} =
|
|
||||||
raise newException(ValueError, "No implementation available")
|
|
||||||
|
|
||||||
method getReceivedVerificationRequests*(self: AccessInterface): seq[VerificationRequest] {.base.} =
|
method getReceivedVerificationRequests*(self: AccessInterface): seq[VerificationRequest] {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
@ -125,9 +125,6 @@ method removeContact*(self: Module, publicKey: string) =
|
|||||||
method changeContactNickname*(self: Module, publicKey: string, nickname: string) =
|
method changeContactNickname*(self: Module, publicKey: string, nickname: string) =
|
||||||
self.controller.changeContactNickname(publicKey, nickname)
|
self.controller.changeContactNickname(publicKey, nickname)
|
||||||
|
|
||||||
method removeContactRequestRejection*(self: Module, publicKey: string) =
|
|
||||||
self.controller.removeContactRequestRejection(publicKey)
|
|
||||||
|
|
||||||
proc addItemToAppropriateModel(self: Module, item: UserItem) =
|
proc addItemToAppropriateModel(self: Module, item: UserItem) =
|
||||||
if(singletonInstance.userProfile.getPubKey() == item.pubKey):
|
if(singletonInstance.userProfile.getPubKey() == item.pubKey):
|
||||||
return
|
return
|
||||||
|
@ -161,9 +161,6 @@ QtObject:
|
|||||||
proc removeTrustStatus*(self: View, publicKey: string) {.slot.} =
|
proc removeTrustStatus*(self: View, publicKey: string) {.slot.} =
|
||||||
self.delegate.removeTrustStatus(publicKey)
|
self.delegate.removeTrustStatus(publicKey)
|
||||||
|
|
||||||
proc removeContactRequestRejection*(self: View, publicKey: string) {.slot.} =
|
|
||||||
self.delegate.removeContactRequestRejection(publicKey)
|
|
||||||
|
|
||||||
proc getSentVerificationDetailsAsJson(self: View, publicKey: string): string {.slot.} =
|
proc getSentVerificationDetailsAsJson(self: View, publicKey: string): string {.slot.} =
|
||||||
return self.delegate.getSentVerificationDetailsAsJson(publicKey)
|
return self.delegate.getSentVerificationDetailsAsJson(publicKey)
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ const SIGNAL_CONTACT_ADDED* = "contactAdded"
|
|||||||
const SIGNAL_CONTACT_BLOCKED* = "contactBlocked"
|
const SIGNAL_CONTACT_BLOCKED* = "contactBlocked"
|
||||||
const SIGNAL_CONTACT_UNBLOCKED* = "contactUnblocked"
|
const SIGNAL_CONTACT_UNBLOCKED* = "contactUnblocked"
|
||||||
const SIGNAL_CONTACT_REMOVED* = "contactRemoved"
|
const SIGNAL_CONTACT_REMOVED* = "contactRemoved"
|
||||||
const SIGNAL_CONTACT_REJECTION_REMOVED* = "contactRejectionRemoved"
|
|
||||||
const SIGNAL_CONTACT_NICKNAME_CHANGED* = "contactNicknameChanged"
|
const SIGNAL_CONTACT_NICKNAME_CHANGED* = "contactNicknameChanged"
|
||||||
const SIGNAL_CONTACTS_STATUS_UPDATED* = "contactsStatusUpdated"
|
const SIGNAL_CONTACTS_STATUS_UPDATED* = "contactsStatusUpdated"
|
||||||
const SIGNAL_CONTACT_UPDATED* = "contactUpdated"
|
const SIGNAL_CONTACT_UPDATED* = "contactUpdated"
|
||||||
@ -474,16 +473,6 @@ QtObject:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
error "an error occurred while dismissing contact request", msg=e.msg
|
error "an error occurred while dismissing contact request", msg=e.msg
|
||||||
|
|
||||||
proc removeContactRequestRejection*(self: Service, publicKey: string) =
|
|
||||||
var contact = self.getContactById(publicKey)
|
|
||||||
contact.removed = false
|
|
||||||
|
|
||||||
# When we know what flags or what `status-go` end point we need to call, we should add
|
|
||||||
# that call here.
|
|
||||||
|
|
||||||
self.saveContact(contact)
|
|
||||||
self.events.emit(SIGNAL_CONTACT_REJECTION_REMOVED, ContactArgs(contactId: contact.id))
|
|
||||||
|
|
||||||
proc changeContactNickname*(self: Service, publicKey: string, nickname: string) =
|
proc changeContactNickname*(self: Service, publicKey: string, nickname: string) =
|
||||||
var contact = self.getContactById(publicKey)
|
var contact = self.getContactById(publicKey)
|
||||||
contact.localNickname = nickname
|
contact.localNickname = nickname
|
||||||
@ -533,6 +522,7 @@ QtObject:
|
|||||||
var contact = self.getContactById(publicKey)
|
var contact = self.getContactById(publicKey)
|
||||||
contact.removed = true
|
contact.removed = true
|
||||||
contact.added = false
|
contact.added = false
|
||||||
|
contact.hasAddedUs = false
|
||||||
|
|
||||||
self.saveContact(contact)
|
self.saveContact(contact)
|
||||||
self.events.emit(SIGNAL_CONTACT_REMOVED, ContactArgs(contactId: contact.id))
|
self.events.emit(SIGNAL_CONTACT_REMOVED, ContactArgs(contactId: contact.id))
|
||||||
|
@ -165,10 +165,6 @@ SplitView {
|
|||||||
logs.logEvent("contactsStore::removeTrustStatus", ["publicKey"], arguments)
|
logs.logEvent("contactsStore::removeTrustStatus", ["publicKey"], arguments)
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeContactRequestRejection(publicKey) {
|
|
||||||
logs.logEvent("contactsStore::removeContactRequestRejection", ["publicKey"], arguments)
|
|
||||||
}
|
|
||||||
|
|
||||||
function verifiedUntrustworthy(publicKey) {
|
function verifiedUntrustworthy(publicKey) {
|
||||||
logs.logEvent("contactsStore::verifiedUntrustworthy", ["publicKey"], arguments)
|
logs.logEvent("contactsStore::verifiedUntrustworthy", ["publicKey"], arguments)
|
||||||
}
|
}
|
||||||
|
@ -77,10 +77,6 @@ QtObject {
|
|||||||
root.contactsModule.dismissContactRequest(pubKey, contactRequestId)
|
root.contactsModule.dismissContactRequest(pubKey, contactRequestId)
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeContactRequestRejection(pubKey) {
|
|
||||||
root.contactsModule.removeContactRequestRejection(pubKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
function markUntrustworthy(pubKey) {
|
function markUntrustworthy(pubKey) {
|
||||||
root.contactsModule.markUntrustworthy(pubKey)
|
root.contactsModule.markUntrustworthy(pubKey)
|
||||||
}
|
}
|
||||||
|
@ -191,22 +191,6 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: btnRevertContactRequestRejectionComponent
|
|
||||||
|
|
||||||
StatusButton {
|
|
||||||
size: StatusButton.Size.Small
|
|
||||||
text: qsTr("Reverse Contact Rejection")
|
|
||||||
icon.name: "refresh"
|
|
||||||
icon.width: 16
|
|
||||||
icon.height: 16
|
|
||||||
onClicked: {
|
|
||||||
root.contactsStore.removeContactRequestRejection(root.publicKey)
|
|
||||||
d.reload()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: btnSendContactRequestComponent
|
id: btnSendContactRequestComponent
|
||||||
StatusButton {
|
StatusButton {
|
||||||
@ -384,11 +368,7 @@ Pane {
|
|||||||
|
|
||||||
// contact request, incoming, pending
|
// contact request, incoming, pending
|
||||||
if (!d.isContact && d.isContactRequestReceived) {
|
if (!d.isContact && d.isContactRequestReceived) {
|
||||||
if (d.contactDetails.removed) {
|
return btnAcceptContactRequestComponent
|
||||||
return btnRevertContactRequestRejectionComponent
|
|
||||||
} else {
|
|
||||||
return btnAcceptContactRequestComponent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// contact request, incoming, rejected
|
// contact request, incoming, rejected
|
||||||
|
Loading…
x
Reference in New Issue
Block a user