mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
codacy: cleanup nested if conditions
This commit is contained in:
parent
0aa8289cb8
commit
66e99d0557
1 changed files with 6 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author Bartek Przybylski
|
||||
|
@ -294,19 +294,18 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
|||
}
|
||||
|
||||
item = menu.findItem(R.id.action_send_share_file);
|
||||
ThemeUtils.tintDrawable(item.getIcon(), ThemeUtils.fontColor());
|
||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
if (item != null) {
|
||||
ThemeUtils.tintDrawable(item.getIcon(), ThemeUtils.fontColor());
|
||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
if (getFile().isSharedWithMe() && !getFile().canReshare()) {
|
||||
// additional restriction for this fragment
|
||||
|
||||
if(getFile().isSharedWithMe() && !getFile().canReshare()){
|
||||
// additional restriction for this fragment
|
||||
if(item != null){
|
||||
item.setVisible(false);
|
||||
item.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue