fix(timeline) : dispatch timeline creations trying to avoid ANRs
This commit is contained in:
parent
454c3edd05
commit
f2bc736c53
1 changed files with 6 additions and 6 deletions
|
|
@ -191,8 +191,8 @@ class RustMatrixRoom(
|
|||
|
||||
override suspend fun subscribeToSync() = roomSyncSubscriber.subscribe(roomId)
|
||||
|
||||
override suspend fun timelineFocusedOnEvent(eventId: EventId): Result<Timeline> {
|
||||
return runCatching {
|
||||
override suspend fun timelineFocusedOnEvent(eventId: EventId): Result<Timeline> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
innerRoom.timelineFocusedOnEvent(
|
||||
eventId = eventId.value,
|
||||
numContextEvents = 50u,
|
||||
|
|
@ -209,8 +209,8 @@ class RustMatrixRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun pinnedEventsTimeline(): Result<Timeline> {
|
||||
return runCatching {
|
||||
override suspend fun pinnedEventsTimeline(): Result<Timeline> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
innerRoom.pinnedEventsTimeline(
|
||||
internalIdPrefix = "pinned_events",
|
||||
maxEventsToLoad = 100u,
|
||||
|
|
@ -225,8 +225,8 @@ class RustMatrixRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun mediaTimeline(): Result<Timeline> {
|
||||
return runCatching {
|
||||
override suspend fun mediaTimeline(): Result<Timeline> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
innerRoom.messageFilteredTimeline(
|
||||
internalIdPrefix = "MediaGallery_",
|
||||
allowedMessageTypes = listOf(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue