Commit 1ed11136 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fix flat building number search

parent 788778b9
......@@ -17,6 +17,7 @@ import com.bluelinelabs.conductor.changehandler.FadeChangeHandler
import com.google.android.material.button.MaterialButton
import com.google.android.material.tabs.TabLayout
import com.google.android.material.textfield.TextInputLayout
import com.jakewharton.rxbinding3.material.selections
import com.jakewharton.rxbinding3.view.clicks
import com.jakewharton.rxbinding3.view.keys
import com.jakewharton.rxbinding3.widget.afterTextChangeEvents
......@@ -55,10 +56,13 @@ class FindFlatScreenController :
override fun getFlat(): Observable<FlatRequestModel> =
flatNumberEditor.afterTextChangeEvents()// keys{ it.keyCode == KeyEvent.KEYCODE_ENTER }
.map { 1 }
.mergeWith(
flatTabs.selections().map { 1 }
)
.filter { flatNumberInput.editText?.text?.isNotEmpty()?:false }
.map {
flatModel
}
.mergeWith(flatTabs.clicks().map { 1 })
.map {flatModel}
.debounce (120,TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment