Pinned events : introduce pinnedEventsTimeline method.
This commit is contained in:
parent
039744c4be
commit
34fd21f440
3 changed files with 25 additions and 0 deletions
|
|
@ -192,6 +192,21 @@ class RustMatrixRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun pinnedEventsTimeline(): Result<Timeline> {
|
||||
return runCatching {
|
||||
innerRoom.pinnedEventsTimeline(
|
||||
internalIdPrefix = "pinned_events",
|
||||
maxEventsToLoad = 100u,
|
||||
).let { inner ->
|
||||
createTimeline(inner, isLive = false)
|
||||
}
|
||||
}.onFailure {
|
||||
if (it is CancellationException) {
|
||||
throw it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun destroy() {
|
||||
roomCoroutineScope.cancel()
|
||||
liveTimeline.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue