Skip to content

Commit e393525

Browse files
authored
Trigger onFacilityChanged along with the levelChanged when selectedLevelId is programmatically updated (#111)
1 parent f8707ab commit e393525

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

toolkit/indoors/src/main/java/com/arcgismaps/toolkit/indoors/FloorFilter.kt

-5
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ public fun FloorFilter(
144144
// get the selected level ID
145145
val selectedLevelID = floorFilterState.onLevelChanged.collectAsStateWithLifecycle().value?.id
146146

147-
// get the selected facility if the level was set programmatically
148-
if (selectedFacility == null) {
149-
selectedFacility = floorFilterState.getSelectedFacility()
150-
}
151-
152147
// if no facility is selected, only display site-facility selector button
153148
if (selectedFacility == null) {
154149
SiteFacilityButton(

toolkit/indoors/src/main/java/com/arcgismaps/toolkit/indoors/FloorFilterState.kt

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ private class FloorFilterStateImpl(
199199
}
200200
filterMap()
201201
}
202+
_onFacilityChanged.value = getSelectedFacility()
202203
_onLevelChanged.value = getSelectedLevel()
203204
getSelectedLevel()?.let {
204205
onSelectionChangedListener(

0 commit comments

Comments
 (0)