Merge branch 'develop' into feature/bma/sxcludePreviewFromCodeCoverage

This commit is contained in:
Benoit Marty
2024-01-11 16:02:58 +01:00
committed by GitHub
952 changed files with 1476 additions and 2027 deletions

View File

@@ -27,7 +27,6 @@ import kotlin.contracts.contract
*/
@Stable
sealed interface AsyncAction<out T> {
/**
* Represents an uninitialized operation (i.e. yet to be run by the user).
*/

View File

@@ -27,7 +27,6 @@ import kotlin.contracts.contract
*/
@Stable
sealed interface AsyncData<out T> {
/**
* Represents a failed operation.
*

View File

@@ -23,9 +23,8 @@ import io.element.android.libraries.architecture.overlay.operation.Hide
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
class HideOverlayBackPressHandler<NavTarget : Any>
: BaseBackPressHandlerStrategy<NavTarget, BackStack.State>() {
class HideOverlayBackPressHandler<NavTarget : Any> :
BaseBackPressHandlerStrategy<NavTarget, BackStack.State>() {
override val canHandleBackPressFlow: Flow<Boolean> by lazy {
navModel.elements.map(::areThereElements)
}

View File

@@ -40,7 +40,6 @@ class Overlay<NavTarget : Any>(
savedStateMap = savedStateMap,
key = key,
) {
override val initialElements: NavElements<NavTarget, BackStack.State>
get() = emptyList()
}

View File

@@ -24,7 +24,6 @@ import kotlinx.parcelize.Parcelize
@Parcelize
class Hide<T : Any> : OverlayOperation<T> {
override fun isApplicable(elements: BackStackElements<T>): Boolean =
elements.any { it.targetState == BackStack.State.ACTIVE }

View File

@@ -29,7 +29,6 @@ import kotlinx.parcelize.RawValue
data class Show<T : Any>(
private val element: @RawValue T
) : OverlayOperation<T> {
override fun isApplicable(elements: BackStackElements<T>): Boolean =
element != elements.activeElement

View File

@@ -84,7 +84,7 @@ class AsyncDataKtTest {
private class TestableMutableState<T>(
value: T
) : MutableState<T> {
@Suppress("ktlint:standard:property-naming")
private val _deque = ArrayDeque<T>(listOf(value))
override var value: T