Remove ImageItem, Paintable and use unified image provider.
This commit is contained in:
@@ -153,7 +153,7 @@ QVariant RoomListModel::data(const QModelIndex& index, int role) const {
|
||||
}
|
||||
SpectralRoom* room = m_rooms.at(index.row());
|
||||
if (role == NameRole) return room->displayName();
|
||||
if (role == PaintableRole) return QVariant::fromValue(room->paintable());
|
||||
if (role == AvatarRole) return room->avatarUrl();
|
||||
if (role == TopicRole) return room->topic();
|
||||
if (role == CategoryRole) {
|
||||
if (room->joinState() == JoinState::Invite) return RoomType::Invited;
|
||||
@@ -193,7 +193,7 @@ void RoomListModel::unreadMessagesChanged(SpectralRoom* room) {
|
||||
QHash<int, QByteArray> RoomListModel::roleNames() const {
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[NameRole] = "name";
|
||||
roles[PaintableRole] = "paintable";
|
||||
roles[AvatarRole] = "avatar";
|
||||
roles[TopicRole] = "topic";
|
||||
roles[CategoryRole] = "category";
|
||||
roles[UnreadCountRole] = "unreadCount";
|
||||
|
||||
Reference in New Issue
Block a user