Merge branch 'develop' into feature/bma/sxcludePreviewFromCodeCoverage
This commit is contained in:
@@ -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).
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,6 @@ import kotlin.contracts.contract
|
||||
*/
|
||||
@Stable
|
||||
sealed interface AsyncData<out T> {
|
||||
|
||||
/**
|
||||
* Represents a failed operation.
|
||||
*
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ class Overlay<NavTarget : Any>(
|
||||
savedStateMap = savedStateMap,
|
||||
key = key,
|
||||
) {
|
||||
|
||||
override val initialElements: NavElements<NavTarget, BackStack.State>
|
||||
get() = emptyList()
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user