Commit 6e6b42bd authored by Luci Stanescu's avatar Luci Stanescu

Fixed sending of signals in ContactModel when contacts are added/updated

parent 5f0a055e
......@@ -1193,7 +1193,7 @@ class ContactModel(QAbstractListModel):
def addContact(self, contact):
if contact in self.items:
return
added_items = [contact.group, contact] if contact.group in self.items else [contact]
added_items = [contact] if contact.group in self.items else [contact.group, contact]
self._add_contact(contact)
self.itemsAdded.emit(added_items)
......@@ -1209,7 +1209,6 @@ class ContactModel(QAbstractListModel):
self._add_contact(contact)
if new_group:
self.itemsAdded.emit([group])
else:
index = self.index(self.items.index(contact))
self.dataChanged.emit(index, index)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment