parent
353110d4ae
commit
167cb9e63f
|
@ -428,25 +428,27 @@ QtObject:
|
||||||
|
|
||||||
proc unblockContact*(self: Service, publicKey: string) =
|
proc unblockContact*(self: Service, publicKey: string) =
|
||||||
var contact = self.getContactById(publicKey)
|
var contact = self.getContactById(publicKey)
|
||||||
contact.blocked = false
|
|
||||||
|
|
||||||
let response = status_contacts.unblockContact(contact.id)
|
let response = status_contacts.unblockContact(contact.id)
|
||||||
if(not response.error.isNil):
|
if(not response.error.isNil):
|
||||||
let msg = response.error.message
|
let msg = response.error.message
|
||||||
error "error unblocking contact ", msg
|
error "error unblocking contact ", msg
|
||||||
return
|
return
|
||||||
|
|
||||||
|
contact.blocked = false
|
||||||
self.saveContact(contact)
|
self.saveContact(contact)
|
||||||
self.events.emit(SIGNAL_CONTACT_UNBLOCKED, ContactArgs(contactId: contact.id))
|
self.events.emit(SIGNAL_CONTACT_UNBLOCKED, ContactArgs(contactId: contact.id))
|
||||||
|
|
||||||
proc blockContact*(self: Service, publicKey: string) =
|
proc blockContact*(self: Service, publicKey: string) =
|
||||||
var contact = self.getContactById(publicKey)
|
var contact = self.getContactById(publicKey)
|
||||||
contact.blocked = true
|
|
||||||
|
|
||||||
let response = status_contacts.blockContact(contact.id)
|
let response = status_contacts.blockContact(contact.id)
|
||||||
if(not response.error.isNil):
|
if(not response.error.isNil):
|
||||||
let msg = response.error.message
|
let msg = response.error.message
|
||||||
error "error blocking contact ", msg
|
error "error blocking contact ", msg
|
||||||
return
|
return
|
||||||
|
|
||||||
|
contact.blocked = true
|
||||||
self.saveContact(contact)
|
self.saveContact(contact)
|
||||||
self.events.emit(SIGNAL_CONTACT_BLOCKED, ContactArgs(contactId: contact.id))
|
self.events.emit(SIGNAL_CONTACT_BLOCKED, ContactArgs(contactId: contact.id))
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ StatusPopupMenu {
|
||||||
|
|
||||||
onHeightChanged: { root.y = setYPosition(); }
|
onHeightChanged: { root.y = setYPosition(); }
|
||||||
onWidthChanged: { root.x = setXPosition(); }
|
onWidthChanged: { root.x = setXPosition(); }
|
||||||
|
onClosed: selectedUserPublicKey = ""
|
||||||
|
|
||||||
width: Math.max(emojiContainer.visible ? emojiContainer.width : 0, 200)
|
width: Math.max(emojiContainer.visible ? emojiContainer.width : 0, 200)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue