small viewholder bind optimization

This commit is contained in:
Gavriil Sitnikov 2016-07-14 07:12:21 +03:00
parent 627608e148
commit dff8fd1703
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ public class BindableViewHolder extends RecyclerView.ViewHolder implements UiBin
.switchMap(attached -> attached
? Observable.just(true)
: Observable.timer(DETACH_DELAY, TimeUnit.MILLISECONDS).map(ignored -> false))
.distinctUntilChanged()
.replay(1)
.refCount();
}