File tree Expand file tree Collapse file tree
raining-light/src/main/java/com/razaghimahdi/raining_light Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ fun RainingLightsBox(
127127
128128
129129 StatelessScreen (
130- list = { lights } ,
130+ list = lights ,
131131 modifier = modifier,
132132 contentAlignment = contentAlignment,
133133 propagateMinConstraints = propagateMinConstraints,
@@ -138,7 +138,7 @@ fun RainingLightsBox(
138138
139139@Composable
140140private fun StatelessScreen (
141- list : () -> List <LightInfo >,
141+ list : List <LightInfo >,
142142 modifier : Modifier ,
143143 contentAlignment : Alignment = Alignment .TopStart ,
144144 propagateMinConstraints : Boolean = false,
@@ -148,17 +148,17 @@ private fun StatelessScreen(
148148
149149 Box (modifier, contentAlignment, propagateMinConstraints) {
150150
151- list() .forEach { light ->
152- MainLight {
151+ list.forEach { light ->
152+ MainLight (
153153 LightInfo (
154154 x = light.x,
155155 y = light.y,
156156 height = light.height,
157157 thickness = light.thickness,
158158 brush = light.brush,
159159 headColor = light.headColor,
160- )
161- }
160+ ))
161+
162162 }
163163
164164 content()
Original file line number Diff line number Diff line change @@ -29,26 +29,26 @@ import com.razaghimahdi.raining_light.core.LightInfo
2929
3030
3131@Composable
32- internal fun MainLight (lightInfo : () -> LightInfo ) {
32+ internal fun MainLight (lightInfo : LightInfo ) {
3333 Box (
3434 modifier = Modifier
3535 .wrapContentSize()
36- .offset(lightInfo() .x, lightInfo() .y),
36+ .offset(lightInfo.x, lightInfo.y),
3737 contentAlignment = Alignment .BottomCenter
3838 ) {
3939
40- val headSize = lightInfo() .thickness * 3
40+ val headSize = lightInfo.thickness * 3
4141
4242 Divider (
4343 modifier = Modifier
44- .height(lightInfo() .height)
45- .width(lightInfo() .thickness)
44+ .height(lightInfo.height)
45+ .width(lightInfo.thickness)
4646 .padding(bottom = headSize / 2 )
47- .background(brush = lightInfo() .brush),
48- thickness = lightInfo() .thickness
47+ .background(brush = lightInfo.brush),
48+ thickness = lightInfo.thickness
4949 )
5050
51- lightInfo() .headColor?.let {
51+ lightInfo.headColor?.let {
5252 Box (
5353 Modifier
5454 .size(headSize)
You can’t perform that action at this time.
0 commit comments