mirror of
https://github.com/nextcloud/android.git
synced 2024-12-01 03:43:43 +03:00
Merge pull request #3152 from nextcloud/codacy
Fixing further codacy issues
This commit is contained in:
commit
6d8c7af90c
3 changed files with 9 additions and 9 deletions
|
@ -108,7 +108,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
private static final int VIEWTYPE_IMAGE = 2;
|
||||
|
||||
private List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>();
|
||||
private boolean onlyOnDevice = false;
|
||||
private boolean onlyOnDevice;
|
||||
|
||||
public OCFileListAdapter(Context context, ComponentsGetter transferServiceGetter,
|
||||
OCFileListFragmentInterface ocFileListFragmentInterface, boolean argHideItemOptions,
|
||||
|
@ -188,14 +188,16 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
}
|
||||
|
||||
public void setEncryptionAttributeForItemID(String fileId, boolean encrypted) {
|
||||
for (int i = 0; i < mFiles.size(); i++) {
|
||||
int filesSize = mFiles.size();
|
||||
for (int i = 0; i < filesSize; i++) {
|
||||
if (mFiles.get(i).getRemoteId().equals(fileId)) {
|
||||
mFiles.get(i).setEncrypted(encrypted);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < mFilesAll.size(); i++) {
|
||||
filesSize = mFilesAll.size();
|
||||
for (int i = 0; i < filesSize; i++) {
|
||||
if (mFilesAll.get(i).getRemoteId().equals(fileId)) {
|
||||
mFilesAll.get(i).setEncrypted(encrypted);
|
||||
break;
|
||||
|
@ -487,7 +489,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
private void showShareIcon(OCFileListGridImageViewHolder gridViewHolder, OCFile file) {
|
||||
ImageView sharedIconView = gridViewHolder.shared;
|
||||
sharedIconView.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
if (file.isSharedWithSharee() || file.isSharedWithMe()) {
|
||||
sharedIconView.setImageResource(R.drawable.shared_via_users);
|
||||
sharedIconView.setContentDescription(mContext.getString(R.string.shared_icon_shared));
|
||||
|
|
|
@ -70,7 +70,6 @@ public class UserListAdapter extends RecyclerView.Adapter<UserListAdapter.UserVi
|
|||
private int accentColor;
|
||||
private List<OCShare> shares;
|
||||
private float avatarRadiusDimension;
|
||||
private Account account;
|
||||
private OCFile file;
|
||||
|
||||
public UserListAdapter(FragmentManager fragmentManager, Context context, List<OCShare> shares, Account account,
|
||||
|
@ -79,7 +78,6 @@ public class UserListAdapter extends RecyclerView.Adapter<UserListAdapter.UserVi
|
|||
this.fragmentManager = fragmentManager;
|
||||
this.shares = shares;
|
||||
this.listener = listener;
|
||||
this.account = account;
|
||||
this.file = file;
|
||||
|
||||
accentColor = ThemeUtils.primaryAccentColor(context);
|
||||
|
@ -118,7 +116,7 @@ public class UserListAdapter extends RecyclerView.Adapter<UserListAdapter.UserVi
|
|||
setImage(holder, name, R.drawable.ic_user);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
holder.name.setText(name);
|
||||
|
||||
ThemeUtils.tintCheckbox(holder.allowEditing, accentColor);
|
||||
|
|
|
@ -308,9 +308,9 @@ public class EditShareFragment extends Fragment {
|
|||
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) {
|
||||
for (int sSubordinateCheckBoxId : sSubordinateCheckBoxIds) {
|
||||
//noinspection ConstantConditions, prevented in the method beginning
|
||||
subordinate = getView().findViewById(sSubordinateCheckBoxIds[i]);
|
||||
subordinate = getView().findViewById(sSubordinateCheckBoxId);
|
||||
subordinate.setVisibility(View.GONE);
|
||||
if (subordinate.isChecked()) {
|
||||
toggleDisablingListener(subordinate);
|
||||
|
|
Loading…
Reference in a new issue