Skip to content

Commit

Permalink
Merge pull request #21 from TradeMe/bugfix/MP-965-config-list-blank
Browse files Browse the repository at this point in the history
MP-965 set initial value for searchTrigger
  • Loading branch information
max1lyu authored Oct 12, 2023
2 parents 04d096c + 912a81e commit 0e39d0c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ext.version = "1.3.1"
ext.version = "1.3.2"
ext.group = "nz.co.trademe.konfigure"
ext.repo = "konfigure"
ext.org = "trademe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ internal class ConfigPresenter(
searchTrigger.tryEmit(Unit)
}

/**
* Triggers a search on the config items
*/
fun search() {
searchTrigger.tryEmit(Unit)
}

/**
* Perform a search on the config items given a search string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ConfigView @JvmOverloads constructor(

override fun onAttachedToWindow() {
super.onAttachedToWindow()
presenter.search()
launch(modelObservationJob) {
presenter.models.collect { models ->
withContext(Dispatchers.Main) {
Expand Down

0 comments on commit 0e39d0c

Please sign in to comment.