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

Commit 953c6b54 authored by tibbi's avatar tibbi
Browse files

use the direct way of selecting items with long presses at recycler view adapter

parent 4ace79d7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -196,7 +196,11 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc
            lastLongPressedItem = if (lastLongPressedItem == -1) {
                position
            } else {
                selectItemRange(lastLongPressedItem, position, Math.min(lastLongPressedItem, position), Math.max(lastLongPressedItem, position))
                val min = Math.min(lastLongPressedItem, position)
                val max = Math.max(lastLongPressedItem, position)
                for (i in min..max) {
                    toggleItemSelection(true, i)
                }
                -1
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ class SecurityDialog(val activity: Activity, val requiredHash: String, val showT

        dialog = AlertDialog.Builder(activity)
                .setOnCancelListener { onCancelFail() }
                .setNegativeButton(R.string.cancel, { dialog, which -> onCancelFail() })
                .setNegativeButton(R.string.cancel) { dialog, which -> onCancelFail() }
                .create().apply {
                    activity.setupDialogStuff(view, this)
                }