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

Commit 32a57760 authored by Ben Kwa's avatar Ben Kwa Committed by Android (Google) Code Review
Browse files

Merge "Fix a crash when deleting documents."

parents e25a8292 8923911c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -614,7 +614,6 @@ public class DirectoryFragment extends Fragment {

        @Override
        public void onItemStateChanged(int position, boolean selected) {

            final Cursor cursor = mModel.getItem(position);
            checkNotNull(cursor, "Cursor cannot be null.");

@@ -700,8 +699,9 @@ public class DirectoryFragment extends Fragment {
                return true;

            } else if (id == R.id.menu_delete) {
                deleteDocuments(selection);
                // Exit selection mode first, so we avoid deselecting deleted documents.
                mode.finish();
                deleteDocuments(selection);
                return true;

            } else if (id == R.id.menu_copy_to) {
@@ -710,8 +710,9 @@ public class DirectoryFragment extends Fragment {
                return true;

            } else if (id == R.id.menu_move_to) {
                transferDocuments(selection, CopyService.TRANSFER_MODE_MOVE);
                // Exit selection mode first, so we avoid deselecting deleted documents.
                mode.finish();
                transferDocuments(selection, CopyService.TRANSFER_MODE_MOVE);
                return true;

            } else if (id == R.id.menu_copy_to_clipboard) {