Disabled context menu on items of not connected account, roster contacts group moving, bugfixes with roster contacts group moving ungrouping and copying

This commit is contained in:
Blue 2019-09-28 17:30:16 +03:00
parent e4d1e21ea0
commit 415d56ba69
20 changed files with 314 additions and 36 deletions

View file

@ -103,3 +103,16 @@ unsigned int Models::Group::getOnlineContacts() const
return amount;
}
bool Models::Group::hasContact(const QString& jid) const
{
for (Models::Item* item : childItems) {
if (item->type == Item::contact) {
const Contact* cnt = static_cast<const Contact*>(item);
if (cnt->getJid() == jid) {
return true;
}
}
}
return false;
}