better new message handling, subscription with adding new contact, out of roster contacts handling

This commit is contained in:
Blue 2019-06-18 18:08:03 +03:00
parent bb509be29a
commit b2699e0087
11 changed files with 100 additions and 23 deletions

View file

@ -76,11 +76,7 @@ QVariant Models::Contact::data(int column) const
{
switch (column) {
case 0:
if (name == "") {
return jid;
} else {
return Item::data(column);
}
return getContactName();
case 1:
return jid;
case 2:
@ -94,6 +90,15 @@ QVariant Models::Contact::data(int column) const
}
}
QString Models::Contact::getContactName() const
{
if (name == "") {
return jid;
} else {
return name;
}
}
void Models::Contact::update(const QString& field, const QVariant& value)
{
if (field == "name") {