Removed exclusive usage of 29 level API
This commit is contained in:
parent
85a350b6c8
commit
3bda7cb26b
@ -82,12 +82,8 @@ class HideViewModel(
|
||||
// ---
|
||||
|
||||
override fun submitQuery() {
|
||||
if (!queryHandler.hasCallbacks(queryRunnable)) {
|
||||
queryHandler.post(queryRunnable)
|
||||
} else {
|
||||
queryHandler.removeCallbacks(queryRunnable)
|
||||
queryHandler.postDelayed(queryRunnable, queryDelay)
|
||||
}
|
||||
queryHandler.removeCallbacks(queryRunnable)
|
||||
queryHandler.postDelayed(queryRunnable, queryDelay)
|
||||
}
|
||||
|
||||
private fun query(
|
||||
|
@ -165,12 +165,8 @@ class ModuleViewModel(
|
||||
// ---
|
||||
|
||||
override fun submitQuery() {
|
||||
if (!queryHandler.hasCallbacks(queryRunnable)) {
|
||||
queryHandler.post(queryRunnable)
|
||||
} else {
|
||||
queryHandler.removeCallbacks(queryRunnable)
|
||||
queryHandler.postDelayed(queryRunnable, queryDelay)
|
||||
}
|
||||
queryHandler.removeCallbacks(queryRunnable)
|
||||
queryHandler.postDelayed(queryRunnable, queryDelay)
|
||||
}
|
||||
|
||||
private fun queryInternal(query: String, offset: Int): Single<List<RepoItem>> {
|
||||
|
@ -17,7 +17,6 @@ import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.animation.doOnEnd
|
||||
import androidx.core.view.*
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.databinding.BindingAdapter
|
||||
import androidx.databinding.InverseBindingAdapter
|
||||
import androidx.databinding.InverseBindingListener
|
||||
@ -427,18 +426,6 @@ fun Chip.setOnCloseClickedListenerBinding(listener: View.OnClickListener) {
|
||||
setOnCloseIconClickListener(listener)
|
||||
}
|
||||
|
||||
@BindingAdapter("onScrollStateChanged")
|
||||
fun NestedScrollView.setOnScrollStateChangeListener(listener: Runnable) {
|
||||
setOnScrollChangeListener { _: NestedScrollView?, _: Int, _: Int, _: Int, _: Int ->
|
||||
if (!handler.hasCallbacks(listener)) {
|
||||
listener.run()
|
||||
} else {
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
}
|
||||
handler.postDelayed(listener, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("progressAnimated")
|
||||
fun ProgressBar.setProgressAnimated(newProgress: Int) {
|
||||
val animator = tag as? ValueAnimator
|
||||
|
Loading…
Reference in New Issue
Block a user