Skip to content

Commit

Permalink
Fix multiple file chooser unselect action
Browse files Browse the repository at this point in the history
Dang! wrong branch
  • Loading branch information
codekidX committed Jul 27, 2017
1 parent 3ab7c60 commit 4ccc433
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ private void handleListMultipleAction(int i, View view) {

} else {
//this item is selected before
secondaryChooserAdapter.selectedPaths.remove(i);
secondaryChooserAdapter.selectedPaths.remove(secondaryChooserAdapter.selectedPaths.indexOf(i));
// reset bg to white
view.setBackgroundColor(Color.WHITE);
mMultipleModeList.remove(i);
view.setBackgroundColor(scheme[Theme.SEC_BG_INDEX]);
mMultipleModeList.remove(mMultipleModeList.indexOf(jointPath));
}

if(mMultipleOnSelectButton.getVisibility() != View.VISIBLE && MODE_MULTIPLE)
Expand All @@ -495,8 +495,17 @@ private void handleListMultipleAction(int i, View view) {
if(listView.getOnItemLongClickListener() !=null && MODE_MULTIPLE)
// long click listener in multiple mode ? haha nice joke
listView.setOnItemLongClickListener(null);

if (mMultipleModeList.size() == 0)
bringBackSingleMode();
}

// private int getListIndex(int i) {
// for(int j=0; j<secondaryChooserAdapter.selectedPaths.size(); j++) {
// if()
// }
// }

/**
* brings back the default state of storage-chooser
* */
Expand Down

0 comments on commit 4ccc433

Please sign in to comment.