Skip to content

Commit

Permalink
Fix static imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zsoltk committed Jan 15, 2024
1 parent a9ed3a8 commit c46208d
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import kotlinx.coroutines.flow.StateFlow
class ExitHeroModeStrategy<NavTarget : Any>(
val scope: CoroutineScope,
val animationSpec: AnimationSpec<Float>? = null
) : BaseBackPressHandlerStrategy<NavTarget, com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State<NavTarget>>() {
) : BaseBackPressHandlerStrategy<NavTarget, SpotlightHeroModel.State<NavTarget>>() {

override val canHandleBackPress: StateFlow<Boolean> by lazy {
transitionModel.output.mapState(scope) { output ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import com.bumble.appyx.components.backstack.operation.newRoot
import com.bumble.appyx.components.backstack.operation.pop
import com.bumble.appyx.components.backstack.operation.push
import com.bumble.appyx.components.backstack.operation.replace
import com.bumble.appyx.demos.sandbox.navigation.ColorSaver
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
import com.bumble.appyx.interactions.core.ui.Visualisation
Expand Down Expand Up @@ -73,7 +75,7 @@ class BackStackNode(
when (navTarget) {
is NavTarget.Child -> node(nodeContext) {
val backgroundColor =
rememberSaveable(saver = com.bumble.appyx.demos.sandbox.navigation.ColorSaver) { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
rememberSaveable(saver = ColorSaver) { colors.shuffled().random() }

Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.bumble.appyx.components.backstack.operation.pop
import com.bumble.appyx.components.backstack.operation.push
import com.bumble.appyx.components.backstack.operation.replace
import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.composable.KnobControl
import com.bumble.appyx.demos.sandbox.navigation.node.backstack.debug.BackstackDebugNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
Expand Down Expand Up @@ -68,7 +69,7 @@ class BackstackDebugNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }

Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.bumble.appyx.components.modal.operation.fullScreen
import com.bumble.appyx.components.modal.operation.revert
import com.bumble.appyx.components.modal.operation.show
import com.bumble.appyx.components.modal.ui.ModalVisualisation
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.node.modal.ModalExamplesNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
Expand Down Expand Up @@ -57,7 +58,7 @@ class ModalExamplesNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }

Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
import com.bumble.appyx.interactions.permanent.PermanentAppyxComponent
import com.bumble.appyx.navigation.composable.PermanentChild
Expand Down Expand Up @@ -51,7 +52,7 @@ class PermanentChildNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child1 -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }
Box(
modifier = Modifier
.fillMaxWidth()
Expand All @@ -70,7 +71,7 @@ class PermanentChildNode(
}

is NavTarget.Child2 -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }
Box(
modifier = Modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.bumble.appyx.components.experimental.promoter.Promoter
import com.bumble.appyx.components.experimental.promoter.PromoterModel
import com.bumble.appyx.components.experimental.promoter.operation.addFirst
import com.bumble.appyx.components.experimental.promoter.ui.PromoterVisualisation
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode.NavTarget.Child
import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE
Expand Down Expand Up @@ -75,7 +76,7 @@ class PromoterNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is Child -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }

Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import com.bumble.appyx.components.spotlight.operation.next
import com.bumble.appyx.components.spotlight.operation.previous
import com.bumble.appyx.components.spotlight.operation.updateElements
import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
import com.bumble.appyx.navigation.composable.AppyxNavigationContainer
Expand Down Expand Up @@ -69,8 +70,8 @@ class SpotlightNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child -> node(nodeContext) { modifier ->
val backgroundColorIdx = rememberSaveable { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().indices.random() }
val backgroundColor = com.bumble.appyx.demos.sandbox.navigation.colors[backgroundColorIdx]
val backgroundColorIdx = rememberSaveable { colors.shuffled().indices.random() }
val backgroundColor = colors[backgroundColorIdx]
var clicked by rememberSaveable { mutableStateOf(false) }

Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.bumble.appyx.components.spotlight.operation.previous
import com.bumble.appyx.components.spotlight.operation.updateElements
import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider
import com.bumble.appyx.components.spotlight.ui.sliderrotation.SpotlightSliderRotation
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightObserveTransitionsExampleNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
import com.bumble.appyx.interactions.core.ui.property.impl.RotationY
Expand Down Expand Up @@ -68,7 +69,7 @@ class SpotlightObserveTransitionsExampleNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child -> node(nodeContext) { modifier ->
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }
Box(
modifier = modifier
.fillMaxSize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.bumble.appyx.components.spotlight.operation.last
import com.bumble.appyx.components.spotlight.operation.next
import com.bumble.appyx.components.spotlight.operation.previous
import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider
import com.bumble.appyx.demos.sandbox.navigation.colors
import com.bumble.appyx.demos.sandbox.navigation.composable.KnobControl
import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.debug.SpotlightDebugNode.NavTarget
import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark
Expand Down Expand Up @@ -69,7 +70,7 @@ class SpotlightDebugNode(
override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
is NavTarget.Child -> node(nodeContext) {
val backgroundColor = remember { com.bumble.appyx.demos.sandbox.navigation.colors.shuffled().random() }
val backgroundColor = remember { colors.shuffled().random() }
Box(
modifier = Modifier
.fillMaxSize()
Expand Down

0 comments on commit c46208d

Please sign in to comment.