Show spaces horizontal bar
### Summary This merge request adds a horizontal bar at top of room list, which shows spaces. By clicking on a space, user can filter out rooms belonging only to that specific space. ### Pending/ Help needed #### Segfault when loading active connection on startup Refer `void SortFilterRoomListModel::cacheSpaceHierarchy()` ([link](8c372800d7 (b969e462c30df43ef3714ea441948d8d8027f6a0_117_126))) in `src/sortfilterroomlistmodel.cpp`. On [line 129](8c372800d7 (b969e462c30df43ef3714ea441948d8d8027f6a0_117_129)), I have called `connection->allRooms()`, which segfaults if the active connection hasn't been loaded yet. Is there a way to ensure that `Controller::instance().activeConnection()` on line 128 waits till connection is loaded? #### Avatars Avatars on space horizontal bar aren't aligned to vertical middle. I'll need help with that. Using the code below doesn't help with padding ```qml delegate: QQC2.Control { topPadding: 10 contentItem: Kirigami.Avatar { ..... } } ``` This complains about uninitialized properties in `Kirigami.Avatar`. (`id`, `currentRoom`, `avatar`, `index` are properties utilized during run time) After we get around these two issue, this MR will be ready from my side.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "events/accountdataevents.h"
|
||||
#include "events/reactionevent.h"
|
||||
#include "events/roomcanonicalaliasevent.h"
|
||||
#include "events/roomcreateevent.h"
|
||||
#include "events/roommessageevent.h"
|
||||
#include "events/roompowerlevelsevent.h"
|
||||
#include "events/typingevent.h"
|
||||
@@ -869,3 +870,17 @@ void NeoChatRoom::clearInvitationNotification()
|
||||
{
|
||||
NotificationsManager::instance().clearInvitationNotification(id());
|
||||
}
|
||||
|
||||
bool NeoChatRoom::isSpace()
|
||||
{
|
||||
const auto creationEvent = this->creation();
|
||||
if (!creationEvent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef QUOTIENT_07
|
||||
return creationEvent->roomType() == RoomType::Space;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user