Add a Mentions room list filter (#5885)

* Add a Mentions room list filter

Adds a new filter chip to the room list that shows only rooms with
unread mentions, using the new mentions room list filter from the
Rust SDK (matrix-org/matrix-rust-sdk branch matthew/mentions-filter).

The SDK version needs bumping to a release that includes the new
filter kind before this can build against the released components.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Order the room list filters by expected usage

Move Favourites ahead of People and Rooms so the more commonly used
filters (Unreads, Mentions, Favourites) sit first in the chip row —
Rooms and Invites are used rarely enough that it's fine for them to
wrap off the side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uk8aPxHn3BHCe52L226jdG

* update the SDK and use the appropriate rust filter types

* preview tests + app settings flag for mentions

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
This commit is contained in:
Matthew Hodgson
2026-09-01 17:08:00 +01:00
committed by GitHub
parent 86bc4d54b6
commit eec2facab1
29 changed files with 440 additions and 121 deletions
@@ -26,6 +26,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol {
appHooks: appHooks,
enableOnlySignedDeviceIsolationMode: appSettings.enableOnlySignedDeviceIsolationMode,
threadsEnabled: appSettings.threadsEnabled)
.enableAutomaticBackPagination(enableAutomaticBackPagination: appSettings.automaticBackPaginationEnabled)
.sqliteStore(config: .init(dataPath: sessionDirectories.dataPath, cachePath: sessionDirectories.cachePath)
.passphrase(passphrase: passphrase))
.serverNameOrHomeserverUrl(serverNameOrUrl: homeserverAddress)
@@ -63,6 +64,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol {
appHooks: appHooks,
enableOnlySignedDeviceIsolationMode: appSettings.enableOnlySignedDeviceIsolationMode,
threadsEnabled: appSettings.threadsEnabled)
.enableAutomaticBackPagination(enableAutomaticBackPagination: appSettings.automaticBackPaginationEnabled)
.sqliteStore(config: .init(dataPath: credentials.restorationToken.sessionDirectories.dataPath,
cachePath: credentials.restorationToken.sessionDirectories.cachePath)
.passphrase(passphrase: credentials.restorationToken.passphrase))
@@ -214,11 +214,6 @@ class ClientProxy: ClientProxyProtocol {
userProfileSubject = .init(UserProfile(userID: (try? client.userId()) ?? ""))
if appSettings.automaticBackPaginationEnabled {
// Must be called before creating the sync service, timelines etc.
client.enableAutomaticBackpagination()
}
mediaLoader = MediaLoader(client: client)
// Route media downloads through a content scanner when one has been configured for the server,
@@ -114,7 +114,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
subscribedForUpdates = true
do {
try await roomListService.subscribeToRooms(roomIds: [id])
try await roomListService.setRoomSubscriptions(roomIds: [id])
} catch {
MXLog.error("Failed subscribing to room with error: \(error)")
}
@@ -246,7 +246,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
Task { [weak self] in
do {
try await self?.roomListService.subscribeToRooms(roomIds: roomIDs)
try await self?.roomListService.setRoomSubscriptions(roomIds: roomIDs)
} catch {
MXLog.error("Failed subscribing to rooms with error: \(error)")
}