Use better id loading methodology

This commit is contained in:
Loren Burkholder 2021-08-30 20:08:47 -04:00
parent 1ac4f3a97b
commit 350fc593ed
7 changed files with 20 additions and 8 deletions

View file

@ -76,7 +76,7 @@ RoomlistModel::roleNames() const
{IsSpace, "isSpace"},
{Tags, "tags"},
{ParentSpaces, "parentSpaces"},
{RoomMemberCount, "roomMemberCount"},
{IsDirect, "isDirect"},
{DirectChatAvatarMxid, "directChatAvatarMxid"},
};
}
@ -131,8 +131,8 @@ RoomlistModel::data(const QModelIndex &index, int role) const
list.push_back(QString::fromStdString(t));
return list;
}
case Roles::RoomMemberCount:
return room->roomMemberCount();
case Roles::IsDirect:
return room->isDirect();
case Roles::DirectChatAvatarMxid:
return room->directChatAvatarMxid();
default: