Skip to content

Commit bc9c564

Browse files
committed
fix : 장소검색 빈 값일때는 API 호출하지말고 그냥 빈 값 처리함
1 parent b745309 commit bc9c564

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

presentation/src/main/java/com/stop/ui/placesearch/PlaceSearchFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ class PlaceSearchFragment : Fragment() {
154154
editTextFlow
155155
.debounce(500)
156156
.onEach {
157-
placeSearchViewModel.getNearPlaces(it.toString())
157+
if(it.toString().isBlank()){
158+
placeSearchViewModel.setNearPlacesEmpty()
159+
}else{
160+
placeSearchViewModel.getNearPlaces(it.toString())
161+
}
158162
}
159163
.launchIn(this)
160164
}

0 commit comments

Comments
 (0)