mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
removed unnecessary code
This commit is contained in:
parent
df4f60dda4
commit
8d29b6318c
2 changed files with 6 additions and 30 deletions
|
@ -154,10 +154,8 @@ public class UploadFilesActivity extends FileActivity implements
|
|||
}
|
||||
case R.id.actionbar_select_all:{
|
||||
if(selectAllToggled){
|
||||
// deselect all
|
||||
toggleOffSelectAll();
|
||||
}else{
|
||||
// select alls
|
||||
toggleOnSelectAll(item);
|
||||
}
|
||||
break;
|
||||
|
@ -170,7 +168,6 @@ public class UploadFilesActivity extends FileActivity implements
|
|||
public void toggleOffSelectAll(MenuItem item){
|
||||
selectAllToggled = false;
|
||||
item.setIcon(android.R.drawable.checkbox_off_background);
|
||||
// mFileListFragment.listDirectory()
|
||||
mFileListFragment.deselectAll();
|
||||
}
|
||||
public void toggleOffSelectAll(){
|
||||
|
@ -179,8 +176,7 @@ public class UploadFilesActivity extends FileActivity implements
|
|||
}
|
||||
public void toggleOnSelectAll(MenuItem item){
|
||||
selectAllToggled = true;
|
||||
item.setIcon(android.R.drawable.checkbox_on_background);
|
||||
|
||||
item.setIcon(android.R.drawable.checkbox_on_background);
|
||||
mFileListFragment.selectAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -101,13 +101,10 @@ public class LocalFileListFragment extends ExtendedListFragment {
|
|||
int numberOfFiles = mAdapter.getCount();
|
||||
for(int i = 0; i < numberOfFiles; i++){
|
||||
File file = (File) mAdapter.getItem(i);
|
||||
if (file != null) {
|
||||
/// Click on a directory
|
||||
if (file.isDirectory()) {
|
||||
|
||||
} else { /// Click on a file
|
||||
getListView().setItemChecked(i, true);
|
||||
|
||||
if (file != null) {
|
||||
if (!file.isDirectory()) {
|
||||
/// Click on a file
|
||||
getListView().setItemChecked(i, true);
|
||||
// notify the change to the container Activity
|
||||
mContainerActivity.onFileClick(file);
|
||||
}
|
||||
|
@ -115,24 +112,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
|
|||
}
|
||||
}
|
||||
|
||||
public void deselectAll(){
|
||||
/*
|
||||
int numberOfFiles = mAdapter.getCount();
|
||||
for(int i = 0; i < numberOfFiles; i++){
|
||||
File file = (File) mAdapter.getItem(i);
|
||||
if (file != null) {
|
||||
/// Click on a directory
|
||||
if (file.isDirectory()) {
|
||||
|
||||
} else { /// Click on a file
|
||||
if(getListView().isItemChecked(i)){
|
||||
getListView().setItemChecked(i, false);
|
||||
}
|
||||
// notify the change to the container Activity
|
||||
mContainerActivity.onFileClick(file);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
public void deselectAll(){
|
||||
mAdapter = new LocalFileListAdapter(mContainerActivity.getInitialDirectory(), getActivity());
|
||||
setListAdapter(mAdapter);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue