Add recent search results to global search (#7742)

* Add global search results history: keep the latest 25 items used in the global search, save them to an encrypted file store.

* Integrate the search history in the global search feature

* Add `MatrixClient.getRoomInfo` and use it in `GlobalSearchPresenter`

---------

Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Jorge Martin Espinosa
2026-09-22 17:17:57 +02:00
committed by GitHub
parent 51fe66cd88
commit 8b1b5560d9
153 changed files with 1537 additions and 401 deletions
@@ -779,6 +779,14 @@ class RustMatrixClient(
}
}
override suspend fun getRoomInfo(roomId: RoomId): Result<RoomInfo?> = withContext(sessionDispatcher) {
runCatchingExceptions {
innerRoomListService.roomOrNull(roomId.value)?.use { room ->
roomInfoMapper.map(room.roomInfo())
}
}
}
override fun getRoomInfoFlow(roomId: RoomId): Flow<Optional<RoomInfo>> {
return mxCallbackFlow {
val roomNotFound = innerRoomListService.roomOrNull(roomId.value).use { it == null }