codacy: cleanup nested if conditions

This commit is contained in:
AndyScherzinger 2018-01-31 15:57:03 +01:00
parent 0aa8289cb8
commit 66e99d0557
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -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}
*/