Skip to content

Commit

Permalink
Merge pull request #10 from abema/use-flow-type
Browse files Browse the repository at this point in the history
Use Flow type for allowing interception
  • Loading branch information
takahirom authored Nov 24, 2021
2 parents ae75240 + c9c3a80 commit 65e7562
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import androidx.lifecycle.coroutineScope
import androidx.lifecycle.repeatOnLifecycle
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -122,7 +122,7 @@ class DefaultImpressionState(
)

private val mutableSharedFlow = MutableSharedFlow<Any>()
override val impressFlow: SharedFlow<Any> = mutableSharedFlow.asSharedFlow()
override val impressFlow: Flow<Any> = mutableSharedFlow.asSharedFlow()

private val mutableVisibleItems: MutableMap<Any, VisibleItem> = mutableMapOf()
val visibleItems: Map<Any, VisibleItem> get() = mutableVisibleItems.toMap()
Expand Down Expand Up @@ -208,7 +208,7 @@ class DefaultImpressionState(
}

interface ImpressionState {
val impressFlow: SharedFlow<Any>
val impressFlow: Flow<Any>

fun onLayoutCoordinatesChange(
key: Any,
Expand Down

0 comments on commit 65e7562

Please sign in to comment.