Skip to content

Commit 69ee3fe

Browse files
committed
fix: linter errors
1 parent 3c8885b commit 69ee3fe

5 files changed

Lines changed: 226 additions & 186 deletions

File tree

example-app/src/main/java/com/mapconductor/example/pages/stores/DemoData.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import androidx.compose.ui.unit.sp
66
import com.mapconductor.core.features.GeoPoint
77
import com.mapconductor.core.marker.DefaultIcon
88
import com.mapconductor.core.marker.MarkerState
9-
import com.mapconductor.icons.FlagIcon
109
import android.os.Bundle
1110

1211
/**

example-app/src/main/java/com/mapconductor/example/pages/stores/StoreMapComponent.kt

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import com.mapconductor.example.MapViewContainer
2121
import com.mapconductor.example.R
2222
import android.os.Bundle
2323

24-
2524
@Composable
2625
fun StoreMapComponent(
2726
mapViewState: MapViewState<*>?,
@@ -39,31 +38,37 @@ fun StoreMapComponent(
3938
}
4039
val context = LocalContext.current
4140
var isMarkerAnimating by remember { mutableStateOf(false) }
42-
val icons = mapOf(
43-
"coffee_bean" to DrawableDefaultIcon(
44-
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.coffee_bean)!!
45-
),
46-
"honolulu_coffee" to DrawableDefaultIcon(
47-
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.honolulu_coffee)!!
48-
),
49-
"coffee_extra" to DrawableDefaultIcon(
50-
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.coffee_extra)!!
51-
),
52-
"starbucks" to DrawableDefaultIcon(
53-
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.starbucks)!!
54-
),
55-
)
5641

57-
val markerList = remember {
58-
markers.map { state ->
59-
(state.extra as Bundle).let { info ->
60-
val store_icon = info.getString("store") ?: "coffee_extra"
61-
state.copy(
62-
icon = icons[store_icon]
63-
)
42+
val icons =
43+
mapOf(
44+
"coffee_bean" to
45+
DrawableDefaultIcon(
46+
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.coffee_bean)!!,
47+
),
48+
"honolulu_coffee" to
49+
DrawableDefaultIcon(
50+
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.honolulu_coffee)!!,
51+
),
52+
"coffee_extra" to
53+
DrawableDefaultIcon(
54+
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.coffee_extra)!!,
55+
),
56+
"starbucks" to
57+
DrawableDefaultIcon(
58+
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.starbucks)!!,
59+
),
60+
)
61+
val markerList =
62+
remember {
63+
markers.map { state ->
64+
(state.extra as Bundle).let { info ->
65+
val storeIcon = info.getString("store") ?: "coffee_extra"
66+
state.copy(
67+
icon = icons[storeIcon],
68+
)
69+
}
6470
}
6571
}
66-
}
6772

6873
mapViewState?.let { currentMapViewState ->
6974
MapViewContainer(
-1.68 MB
Binary file not shown.

0 commit comments

Comments
 (0)