fix(timeline) : dispatch timeline creations trying to avoid ANRs
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user