summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cache.cpp1
-rw-r--r--src/CacheStructs.h1
-rw-r--r--src/RoomsModel.cpp3
-rw-r--r--src/RoomsModel.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index e6b7313e..aae7acde 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -2866,6 +2866,7 @@ Cache::roomNamesAndAliases()
               .alias           = std::move(alias),
               .recent_activity = info.approximate_last_modification_ts,
               .is_tombstoned   = info.is_tombstoned,
+              .is_space        = info.is_space,
             });
         } catch (std::exception &e) {
             nhlog::db()->warn("Failed to add room {} to result: {}", room_id, e.what());
diff --git a/src/CacheStructs.h b/src/CacheStructs.h
index 6e2f800a..f1aafb96 100644
--- a/src/CacheStructs.h
+++ b/src/CacheStructs.h
@@ -110,6 +110,7 @@ struct RoomNameAlias
     std::string id, name, alias;
     std::uint64_t recent_activity;
     bool is_tombstoned;
+    bool is_space;
 };
 
 //! Basic information per member.
diff --git a/src/RoomsModel.cpp b/src/RoomsModel.cpp
index 7481eb51..fff9cbc6 100644
--- a/src/RoomsModel.cpp
+++ b/src/RoomsModel.cpp
@@ -36,6 +36,7 @@ RoomsModel::roleNames() const
       {Roles::RoomID, "roomid"},
       {Roles::RoomName, "roomName"},
       {Roles::IsTombstoned, "isTombstoned"},
+      {Roles::IsSpace, "isSpace"},
     };
 }
 
@@ -69,6 +70,8 @@ RoomsModel::data(const QModelIndex &index, int role) const
             return QString::fromStdString(rooms[index.row()].id).toHtmlEscaped();
         case Roles::IsTombstoned:
             return rooms[index.row()].is_tombstoned;
+        case Roles::IsSpace:
+            return rooms[index.row()].is_space;
         }
     }
     return {};
diff --git a/src/RoomsModel.h b/src/RoomsModel.h
index 3e49ca87..83a21ae0 100644
--- a/src/RoomsModel.h
+++ b/src/RoomsModel.h
@@ -19,6 +19,7 @@ public:
         RoomID,
         RoomName,
         IsTombstoned,
+        IsSpace,
     };
 
     RoomsModel(bool showOnlyRoomWithAliases = false, QObject *parent = nullptr);