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 @@ -191,8 +191,8 @@ class RustMatrixRoom(
191191
192192 override suspend fun subscribeToSync () = roomSyncSubscriber.subscribe(roomId)
193193
194- override suspend fun timelineFocusedOnEvent (eventId : EventId ): Result <Timeline > {
195- return runCatching {
194+ override suspend fun timelineFocusedOnEvent (eventId : EventId ): Result <Timeline > = withContext(roomDispatcher) {
195+ runCatching {
196196 innerRoom.timelineFocusedOnEvent(
197197 eventId = eventId.value,
198198 numContextEvents = 50u ,
@@ -209,8 +209,8 @@ class RustMatrixRoom(
209209 }
210210 }
211211
212- override suspend fun pinnedEventsTimeline (): Result <Timeline > {
213- return runCatching {
212+ override suspend fun pinnedEventsTimeline (): Result <Timeline > = withContext(roomDispatcher) {
213+ runCatching {
214214 innerRoom.pinnedEventsTimeline(
215215 internalIdPrefix = " pinned_events" ,
216216 maxEventsToLoad = 100u ,
@@ -225,8 +225,8 @@ class RustMatrixRoom(
225225 }
226226 }
227227
228- override suspend fun mediaTimeline (): Result <Timeline > {
229- return runCatching {
228+ override suspend fun mediaTimeline (): Result <Timeline > = withContext(roomDispatcher) {
229+ runCatching {
230230 innerRoom.messageFilteredTimeline(
231231 internalIdPrefix = " MediaGallery_" ,
232232 allowedMessageTypes = listOf (
You can’t perform that action at this time.
0 commit comments