File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ class RustMatrixRoom(
204204
205205 override suspend fun subscribeToSync () = roomSyncSubscriber.subscribe(roomId)
206206
207- override suspend fun timelineFocusedOnEvent (eventId : EventId ): Result <Timeline > {
208- return runCatching {
207+ override suspend fun timelineFocusedOnEvent (eventId : EventId ): Result <Timeline > = withContext(roomDispatcher) {
208+ runCatching {
209209 innerRoom.timelineFocusedOnEvent(
210210 eventId = eventId.value,
211211 numContextEvents = 50u ,
@@ -222,8 +222,8 @@ class RustMatrixRoom(
222222 }
223223 }
224224
225- override suspend fun pinnedEventsTimeline (): Result <Timeline > {
226- return runCatching {
225+ override suspend fun pinnedEventsTimeline (): Result <Timeline > = withContext(roomDispatcher) {
226+ runCatching {
227227 innerRoom.pinnedEventsTimeline(
228228 internalIdPrefix = " pinned_events" ,
229229 maxEventsToLoad = 100u ,
@@ -238,8 +238,8 @@ class RustMatrixRoom(
238238 }
239239 }
240240
241- override suspend fun mediaTimeline (): Result <Timeline > {
242- return runCatching {
241+ override suspend fun mediaTimeline (): Result <Timeline > = withContext(roomDispatcher) {
242+ runCatching {
243243 innerRoom.messageFilteredTimeline(
244244 internalIdPrefix = " MediaGallery_" ,
245245 allowedMessageTypes = listOf (
You can’t perform that action at this time.
0 commit comments