Skip to content

Commit ee5e21e

Browse files
authored
Merge pull request #492 from BCSDLab/releases/v4.1.0
Update v4.1.0
2 parents b148eb5 + dad96de commit ee5e21e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

koin/src/main/java/in/koreatech/koin/ui/store/activity/StoreActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class StoreActivity : KoinNavigationDrawerTimeActivity() {
138138
viewModel.setCategory(it + 1)
139139
binding.searchEditText.text.clear()
140140
val current = viewModel.category.value?.name
141-
viewModel.setCategory(it)
141+
142142
if (current != null && previous != null) {
143143
EventLogger.logClickEvent(
144144
EventAction.BUSINESS,
@@ -313,6 +313,7 @@ class StoreActivity : KoinNavigationDrawerTimeActivity() {
313313
@SuppressLint("RestrictedApi")
314314
object : TextWatcherAdapter() {
315315
override fun afterTextChanged(p0: Editable) {
316+
if(p0.isNotEmpty()) viewModel.updateSearchQuery(binding.searchEditText.text.toString())
316317
viewModel.getRelatedStore()
317318
binding.suggestionsLayout.visibility =
318319
if (p0.isEmpty()) View.GONE else View.VISIBLE
@@ -503,7 +504,6 @@ class StoreActivity : KoinNavigationDrawerTimeActivity() {
503504
if (binding.searchEditText.text.isNullOrEmpty()) {
504505
return true
505506
}
506-
viewModel.updateSearchQuery(binding.searchEditText.text.toString())
507507
binding.searchResultTextView.text =
508508
"\"${binding.searchEditText.text}\" 관련 가게가 총 ${storeAdapter.itemCount}개 있어요."
509509
hideSoftKeyboard()
@@ -562,7 +562,7 @@ class StoreActivity : KoinNavigationDrawerTimeActivity() {
562562

563563
observeLiveData(viewModel.searchRelated) {
564564
searchRelatedAdapter.submitList(it.keywords)
565-
if (it.keywords.isNullOrEmpty() && binding.searchEditText.text.isNotEmpty()) {
565+
if (it.keywords.isEmpty() && binding.searchEditText.text.isNotEmpty()) {
566566
binding.noResultTextView.visibility = View.VISIBLE
567567
binding.suggestionsRecyclerView.visibility = View.GONE
568568
} else {

koin/src/main/java/in/koreatech/koin/ui/store/viewmodel/StoreViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class StoreViewModel @Inject constructor(
8181
getStoreCategories()
8282
getStoreEvents()
8383
//changeCategory()
84-
// searchStore()
84+
searchStore()
85+
getRelatedStore()
8586

8687
}
8788

0 commit comments

Comments
 (0)