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

Commit f10777b1 authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

Issue 6795: File Manager selected file actions vanish on navigation to parent directory

Issue: http://code.google.com/p/cyanogenmod/issues/detail?id=6795

The issue is relate to back navigation (nor to ahead navigation). In this case the history
parcelable info data is recovery (which has a invalid selection data).
On back navigation, replace the selection data parcelable info with the current selection
of the navigation view.
Added notifyDataSetChanged() when toogle visibility, needed to refresh the view and repaint
the items.

Change-Id: Ib281c6fbc33274f6e81cc6b588cde420d6ceb19f
parent 63d1e03d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1218,6 +1218,8 @@ public class NavigationActivity extends Activity
                        (NavigationViewInfoParcelable)realHistory.getItem();
                int viewId = info.getId();
                NavigationView view = getNavigationView(viewId);
                // Selected items must not be restored from on history navigation
                info.setSelectedFiles(view.getSelectedFiles());
                view.onRestoreState(info);

            } else if (realHistory.getItem() instanceof SearchInfoParcelable) {
+1 −0
Original line number Diff line number Diff line
@@ -457,6 +457,7 @@ public class FileSystemObjectAdapter
                            theme.getDrawable(
                                    getContext(), "checkbox_deselected_drawable"); //$NON-NLS-1$
                }
                notifyDataSetChanged();

                //Add or remove from the global selected items
                FileSystemObject fso = getItem(i);