Skip to content

Commit

Permalink
Issue 6795: File Manager selected file actions vanish on navigation t…
Browse files Browse the repository at this point in the history
…o 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
  • Loading branch information
jruesga committed Dec 5, 2012
1 parent 63d1e03 commit f10777b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,8 @@ public boolean navigateToHistory(History history) {
(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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ private void doSelectDeselectAllVisibleItems(boolean select) {
theme.getDrawable(
getContext(), "checkbox_deselected_drawable"); //$NON-NLS-1$
}
notifyDataSetChanged();

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

0 comments on commit f10777b

Please sign in to comment.