forked from upstream-mirrors/quik
Don't include default selection from adapter
This commit is contained in:
@@ -48,7 +48,7 @@ abstract class QkRealmAdapter<T : RealmModel> : RealmRecyclerViewAdapter<T, QkVi
|
||||
emptyView?.setVisible(data.isLoaded && data.isEmpty())
|
||||
}
|
||||
|
||||
val selectionChanges: Subject<List<Long>> = BehaviorSubject.createDefault(listOf())
|
||||
val selectionChanges: Subject<List<Long>> = BehaviorSubject.create()
|
||||
|
||||
private var selection = listOf<Long>()
|
||||
|
||||
|
||||
+2
-2
@@ -77,8 +77,8 @@ class BlockedMessagesPresenter @Inject constructor(
|
||||
.subscribe { selection -> newState { copy(selected = selection.size) } }
|
||||
|
||||
view.backClicked
|
||||
.withLatestFrom(view.selectionChanges) { _, selection ->
|
||||
when (selection.size) {
|
||||
.withLatestFrom(state) { _, state ->
|
||||
when (state.selected) {
|
||||
0 -> view.goBack()
|
||||
else -> view.clearSelection()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user