Why can't we be friends

Update the UX to refer to structure direct chats as friends. The direct chats are pulled into their own tab in the space drawer.

The `UserDetailDialog` is also updated to check whether a direct chat already exists and if not ask to invite as friend.

![image](/uploads/67f13fa8558e704e0acaf7c60e135bbc/image.png)
This commit is contained in:
James Graham
2024-01-13 21:38:43 +00:00
parent 981edc9cf7
commit 77e366b179
9 changed files with 222 additions and 9 deletions

View File

@@ -368,6 +368,9 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const
if (role == ReplacementIdRole) {
return room->successorId();
}
if (role == IsDirectChat) {
return room->isDirectChat();
}
return QVariant();
}
@@ -401,6 +404,7 @@ QHash<int, QByteArray> RoomListModel::roleNames() const
roles[IsSpaceRole] = "isSpace";
roles[RoomIdRole] = "roomId";
roles[IsChildSpaceRole] = "isChildSpace";
roles[IsDirectChat] = "isDirectChat";
return roles;
}
@@ -412,7 +416,7 @@ QString RoomListModel::categoryName(int category)
case NeoChatRoomType::Favorite:
return i18n("Favorite");
case NeoChatRoomType::Direct:
return i18n("Direct Messages");
return i18n("Friends");
case NeoChatRoomType::Normal:
return i18n("Normal");
case NeoChatRoomType::Deprioritized: