Skip to content

Commit

Permalink
Fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
odiapratama committed Jul 19, 2021
1 parent c18e25c commit 7ec8060
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/src/main/java/com/bedrest/app/ui/AvailabilityActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AvailabilityActivity : BaseMapsActivity<ActivityAvailabilityBinding>() {

suggestionAdapter = ProvinceSuggestionAdapter(getStringArray(R.array.list_provinces)) {
searchKey = it.toKeywordPattern()
availabilityViewModel.getAvailability(searchKey)
binding.searchView.setQuery(searchKey.convertKeyword(), false)
}
binding.rvSuggestion.adapter = suggestionAdapter

Expand Down Expand Up @@ -97,8 +97,6 @@ class AvailabilityActivity : BaseMapsActivity<ActivityAvailabilityBinding>() {
binding.containerMarkerClickedState.gone()
availabilityAdapter.submitList(it.data)
addMarkersData(it.data)
binding.searchView.setQuery(searchKey.convertKeyword(), false)
binding.searchView.clearFocus()
skeleton.showOriginal()
}
is ResultData.Error -> {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_availability.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:background="@drawable/shape_rounded_white"
android:elevation="@dimen/xxsmall"
android:focusable="false"
app:iconifiedByDefault="true"
app:iconifiedByDefault="false"
app:queryHint="@string/cari_provinsi_disini"
app:layout_constraintTop_toTopOf="parent"
app:searchIcon="@drawable/ic_search" />
Expand Down

0 comments on commit 7ec8060

Please sign in to comment.