Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f703d417 authored by moezbhatti's avatar moezbhatti
Browse files

Don't include default selection from adapter

parent e1b1a6c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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()
                    }