proper on/off switch for status show

This commit is contained in:
csoler 2019-08-15 19:43:41 +02:00
parent 038a0ae4c7
commit 70680fae47
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
3 changed files with 15 additions and 6 deletions

View file

@ -56,6 +56,12 @@ RsFriendListModel::RsFriendListModel(QObject *parent)
mFilterStrings.clear();
}
void RsFriendListModel::setDisplayStatusString(bool b)
{
mDisplayStatusString = b;
postMods();
}
void RsFriendListModel::setDisplayGroups(bool b)
{
mDisplayGroups = b;
@ -676,7 +682,7 @@ QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
{
std::string css = rsMsgs->getCustomStateString(node->node_info.id);
if(!css.empty())
if(!css.empty() && mDisplayStatusString)
return QVariant(QString::fromUtf8(node->node_info.location.c_str())+"\n"+QString::fromUtf8(css.c_str()));
else
return QVariant(QString::fromUtf8(node->node_info.location.c_str()));