Timeline : let FocusOnEvent be cancellable and refactor a bit focus states.

This commit is contained in:
ganfra 2024-06-14 19:04:11 +02:00
parent f53dbef8de
commit 75b1c22197
10 changed files with 105 additions and 52 deletions

View file

@ -87,6 +87,7 @@ import org.matrix.rustcomponents.sdk.use
import timber.log.Timber
import uniffi.matrix_sdk.RoomPowerLevelChanges
import java.io.File
import kotlin.coroutines.cancellation.CancellationException
import org.matrix.rustcomponents.sdk.Room as InnerRoom
import org.matrix.rustcomponents.sdk.Timeline as InnerTimeline
@ -183,6 +184,10 @@ class RustMatrixRoom(
}
}.mapFailure {
it.toFocusEventException()
}.onFailure {
if (it is CancellationException) {
throw it
}
}
}