mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +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:{
|
case R.id.actionbar_select_all:{
|
||||||
if(selectAllToggled){
|
if(selectAllToggled){
|
||||||
// deselect all
|
|
||||||
toggleOffSelectAll();
|
toggleOffSelectAll();
|
||||||
}else{
|
}else{
|
||||||
// select alls
|
|
||||||
toggleOnSelectAll(item);
|
toggleOnSelectAll(item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -170,7 +168,6 @@ public class UploadFilesActivity extends FileActivity implements
|
||||||
public void toggleOffSelectAll(MenuItem item){
|
public void toggleOffSelectAll(MenuItem item){
|
||||||
selectAllToggled = false;
|
selectAllToggled = false;
|
||||||
item.setIcon(android.R.drawable.checkbox_off_background);
|
item.setIcon(android.R.drawable.checkbox_off_background);
|
||||||
// mFileListFragment.listDirectory()
|
|
||||||
mFileListFragment.deselectAll();
|
mFileListFragment.deselectAll();
|
||||||
}
|
}
|
||||||
public void toggleOffSelectAll(){
|
public void toggleOffSelectAll(){
|
||||||
|
@ -179,8 +176,7 @@ public class UploadFilesActivity extends FileActivity implements
|
||||||
}
|
}
|
||||||
public void toggleOnSelectAll(MenuItem item){
|
public void toggleOnSelectAll(MenuItem item){
|
||||||
selectAllToggled = true;
|
selectAllToggled = true;
|
||||||
item.setIcon(android.R.drawable.checkbox_on_background);
|
item.setIcon(android.R.drawable.checkbox_on_background);
|
||||||
|
|
||||||
mFileListFragment.selectAll();
|
mFileListFragment.selectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,13 +101,10 @@ public class LocalFileListFragment extends ExtendedListFragment {
|
||||||
int numberOfFiles = mAdapter.getCount();
|
int numberOfFiles = mAdapter.getCount();
|
||||||
for(int i = 0; i < numberOfFiles; i++){
|
for(int i = 0; i < numberOfFiles; i++){
|
||||||
File file = (File) mAdapter.getItem(i);
|
File file = (File) mAdapter.getItem(i);
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
/// Click on a directory
|
if (!file.isDirectory()) {
|
||||||
if (file.isDirectory()) {
|
/// Click on a file
|
||||||
|
getListView().setItemChecked(i, true);
|
||||||
} else { /// Click on a file
|
|
||||||
getListView().setItemChecked(i, true);
|
|
||||||
|
|
||||||
// notify the change to the container Activity
|
// notify the change to the container Activity
|
||||||
mContainerActivity.onFileClick(file);
|
mContainerActivity.onFileClick(file);
|
||||||
}
|
}
|
||||||
|
@ -115,24 +112,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deselectAll(){
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
mAdapter = new LocalFileListAdapter(mContainerActivity.getInitialDirectory(), getActivity());
|
mAdapter = new LocalFileListAdapter(mContainerActivity.getInitialDirectory(), getActivity());
|
||||||
setListAdapter(mAdapter);
|
setListAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue